@@ -38,7 +38,7 @@ class Manufacturer(db.Model):
3838 """Represents a Manufacturer."""
3939 esta_id = db .IntegerProperty (required = True )
4040 name = db .StringProperty (required = True )
41- # link to the product page
41+ # link to the manufacturer website
4242 link = db .LinkProperty ();
4343 # url of the source image
4444 image_url = db .LinkProperty ();
@@ -58,12 +58,13 @@ class Responder(db.Model):
5858 manufacturer = db .ReferenceProperty (Manufacturer , required = True )
5959 # The Device Model ID field from DEVICE_INFO
6060 device_model_id = db .IntegerProperty ()
61- # The DEVICE_MODEL_DESCRIPTION
62- model_description = db .StringProperty (required = True )
61+ # Description can't be required, as DEVICE_MODEL_DESCRIPTION is not a
62+ # mandatory PID.
63+ model_description = db .StringProperty (default = None )
6364 # The product category
6465 product_category = db .ReferenceProperty (ProductCategory ,
6566 collection_name = 'responder_set' )
66- # link to the product page
67+ # link to the responder product page
6768 link = db .LinkProperty ();
6869 # url of the source image
6970 image_url = db .LinkProperty ();
@@ -100,8 +101,11 @@ class SoftwareVersion(db.Model):
100101 """Represents a particular software version on a responder."""
101102 # Version id
102103 version_id = db .IntegerProperty (required = True )
103- # Version label
104- label = db .StringProperty (default = '' )
104+ # Version label should be required, as SOFTWARE_VERSION_LABEL is a mandatory
105+ # PID but we've had real world devices without it, or there could be issues
106+ # with their implementation such as it being empty (which App Engine treats
107+ # as not present)
108+ label = db .StringProperty (default = None )
105109 # supported params
106110 supported_parameters = db .ListProperty (int )
107111 # reference to the responder this version is associated with
@@ -112,8 +116,9 @@ class SoftwareVersion(db.Model):
112116
113117class ResponderPersonality (db .Model ):
114118 """Represents a personality of a responder."""
115- # TODO(simon): make description required some time once we have all the data.
116- description = db .StringProperty ()
119+ # Description can't be required, as DMX_PERSONALITY_DESCRIPTION is not a
120+ # mandatory PID.
121+ description = db .StringProperty (default = None )
117122 index = db .IntegerProperty (required = True )
118123 # Sometimes we know a personality exists, but not the description or the slot
119124 # count.
@@ -126,7 +131,11 @@ class ResponderPersonality(db.Model):
126131
127132class ResponderSensor (db .Model ):
128133 """Represents a Sensor on a responder."""
129- description = db .StringProperty (required = True )
134+ # Sensor description should be required, as the description field is part of
135+ # the SENSOR_DEFINITION PID but there may be real world devices with issues
136+ # with their implementation such as it being empty (which App Engine treats
137+ # as not present)
138+ description = db .StringProperty (default = None )
130139 index = db .IntegerProperty (required = True )
131140 type = db .IntegerProperty (required = True )
132141 supports_min_max_recording = db .BooleanProperty ()
0 commit comments