diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-08-17 00:05:23 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-08-17 00:05:23 +0300 |
commit | 8565e4dc0b7acd16078700c03031beca8d26be77 (patch) | |
tree | 014035d543dfa8de7d9b1c9407daf54a89ac4f67 /servo/models/device.py | |
parent | 424bfdb617003dc8cddc4c10afb64583824341db (diff) | |
download | Servo-8565e4dc0b7acd16078700c03031beca8d26be77.tar.gz Servo-8565e4dc0b7acd16078700c03031beca8d26be77.tar.bz2 Servo-8565e4dc0b7acd16078700c03031beca8d26be77.zip |
Misc fixes
Diffstat (limited to 'servo/models/device.py')
-rw-r--r-- | servo/models/device.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/servo/models/device.py b/servo/models/device.py index ea719a3..993b96b 100644 --- a/servo/models/device.py +++ b/servo/models/device.py @@ -342,9 +342,11 @@ class Device(models.Model): serial_number = wty.serialNumber or sn device = Device(sn=serial_number) - if device.notes == '': - device.notes = wty.notes or '' - device.notes += wty.csNotes or '' + from servo.lib.utils import empty + + if empty(device.notes): + device.notes = wty.notes or '' + device.notes += wty.csNotes or '' device.has_onsite = product.has_onsite device.is_vintage = product.is_vintage |