Commits

Rob Lanphier  committed 8e00786

Properly identify nodes with user_key as additional prop node

  • Participants
  • Parent commits f72d937

Comments (0)

Files changed (1)

File jsonwidget/schema.py

             for subkey, subdata in self.data[properties_id].items():
                 ordermap = \
                     self.ordermap['children'][properties_id]['children'][subkey]
+
+                if (self.schemaformat.version == 1 and 
+                    'user_key' in self.data and
+                    subkey == self.data['user_key']):
+                    isaddedprop = True
+                else:
+                    isaddedprop = False
+
                 self.children[subkey] = SchemaNode(key=subkey, data=subdata,
                                                    parent=self, 
-                                                   ordermap=ordermap)
+                                                   ordermap=ordermap,
+                                                   isaddedprop=isaddedprop)
         elif(self.data['type'] == fmt.typemap['array']):
             if fmt.version == 1:
                 ordermap = self.ordermap['children'][items_id]['children'][0]