summaryrefslogtreecommitdiffstats
path: root/compass-deck/db
diff options
context:
space:
mode:
Diffstat (limited to 'compass-deck/db')
-rw-r--r--compass-deck/db/api/machine.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/compass-deck/db/api/machine.py b/compass-deck/db/api/machine.py
index 7991ada..4222288 100644
--- a/compass-deck/db/api/machine.py
+++ b/compass-deck/db/api/machine.py
@@ -68,7 +68,7 @@ def _get_machine(machine_id, session=None, **kwargs):
@utils.input_validates(mac=utils.check_mac)
def _add_machine(mac, owner_id=None, session=None, **kwargs):
"""Add a machine."""
- if isinstance(owner_id, (int, long)):
+ if not owner_id or isinstance(owner_id, (int, long)):
return utils.add_db_object(
session, models.Machine,
True,