Skip to content

Commit

Permalink
Merge pull request #115 from andersonluisribeiro/hotfix/update-templa…
Browse files Browse the repository at this point in the history
…te-after-import

hotfix update template after import
  • Loading branch information
giovannicuriel committed Apr 1, 2019
2 parents 8a224ea + 6ba19e0 commit aefa0c3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions DeviceManager/SerializationModels.py
Expand Up @@ -52,8 +52,8 @@ class AttrSchema(Schema):
updated = fields.DateTime(dump_only=True)
type = fields.Str(required=True)
value_type = fields.Str(required=True)
static_value = fields.Field()
template_id = fields.Str()
static_value = fields.Field(allow_none=True)
template_id = fields.Str(dump_only=True)

metadata = fields.Nested(MetaSchema, many=True, attribute='children', validate=validate_children_attr_label)

Expand Down Expand Up @@ -89,7 +89,6 @@ def set_import_id(self, data):
def remove_null_values(self, data):
return {key: value for key, value in data.items() if value is not None}


template_schema = TemplateSchema()
template_list_schema = TemplateSchema(many=True)

Expand Down

0 comments on commit aefa0c3

Please sign in to comment.