Changeset acf8893


Ignore:
Timestamp:
Apr 4, 2020, 12:42:42 PM (7 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
debian/bullseye, master
Children:
eb98ba4
Parents:
bcaee05
Message:

Fixed device creation, since comment is optional

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mapservice/src/server_impl/controllers/DevicesController.py

    rbcaee05 racf8893  
    5151                raise MapserviceUnauthorized
    5252       
    53         device = Device(name=device_creation.name, owner=user, sensor_depth=device_creation.sensor_depth, comment=device_creation.comment)
     53        comment = ""
     54        if device_creation.comment:
     55                comment = device_creation.comment
     56       
     57        device = Device(name=device_creation.name, owner=user, sensor_depth=device_creation.sensor_depth, comment=comment)
    5458        db.session.add(device)
    5559        db.session.commit()
Note: See TracChangeset for help on using the changeset viewer.