Skip to content

Commit 6c2621c

Browse files
committed
Replace 'id' with 'pk'. Fixes ietf-tools#570
- Legacy-Id: 2750
1 parent 92e9360 commit 6c2621c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

workflows/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def set_to_object(self, obj):
125125

126126
ctype = ContentType.objects.get_for_model(obj)
127127
try:
128-
wor = WorkflowObjectRelation.objects.get(content_type=ctype, content_id=obj.id)
128+
wor = WorkflowObjectRelation.objects.get(content_type=ctype, content_id=obj.pk)
129129
except WorkflowObjectRelation.DoesNotExist:
130130
WorkflowObjectRelation.objects.create(content = obj, workflow=self)
131131
workflows.utils.set_state(obj, self.initial_state)
@@ -354,4 +354,4 @@ class StatePermissionRelation(models.Model):
354354
role = models.ForeignKey(Role, verbose_name=_(u"Role"))
355355

356356
def __unicode__(self):
357-
return "%s %s %s" % (self.state.name, self.role.name, self.permission.name)
357+
return "%s %s %s" % (self.state.name, self.role.name, self.permission.name)

0 commit comments

Comments
 (0)