diff --git a/ereuse_devicehub/resources/device/models.py b/ereuse_devicehub/resources/device/models.py index b3aa2343..9df1e3b2 100644 --- a/ereuse_devicehub/resources/device/models.py +++ b/ereuse_devicehub/resources/device/models.py @@ -78,8 +78,8 @@ logger = logging.getLogger(__name__) def create_code(context): - _id = Device.query.order_by(Device.id.desc()).first() or 3 - if not _id == 3: + _id = Device.query.order_by(Device.id.desc()).first() or 1 + if not _id == 1: _id = _id.id + 1 return hashcode.encode(_id)