Skip to content

Commit

Permalink
Fixes #3 -- Check if self.instance.pk has value
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverroick authored and Ian Ross committed Jul 10, 2016
1 parent fcfafa3 commit 42b8e73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jsonattrs/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def add_attribute_fields(self, schema_selectors):
attrs = None
attrvals = getattr(self.instance, self.attributes_field)
schemas = None
if self.instance.pk is not None:
if self.instance.pk:
schemas = Schema.objects.from_instance(self.instance)
elif schema_selectors is not None:
selectors = []
Expand Down

0 comments on commit 42b8e73

Please sign in to comment.