Skip to content
This repository was archived by the owner on Sep 18, 2021. It is now read-only.

Commit 95aaa54

Browse files
author
4d11
committed
Added comparison operator for User model
1 parent a97dec2 commit 95aaa54

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

instagram/models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ def __init__(self, id, *args, **kwargs):
205205
def __unicode__(self):
206206
return "User: %s" % self.username
207207

208+
def __eq__(self, other):
209+
return self.id == other.id
208210

209211
class Relationship(ApiModel):
210212

0 commit comments

Comments
 (0)