Skip to content

Commit

Permalink
Check types to avoid AttributeError
Browse files Browse the repository at this point in the history
"It won't be inexcept... unexcept... it won't
throw an exception" --Ulincsys

Signed-off-by: Seltyk <whhacker.dcx@gmail.com>
  • Loading branch information
Seltyk committed Aug 4, 2023
1 parent 69f0f28 commit c876798
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion augur/application/db/models/augur_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ class ClientApplication(Base):
subscriptions = relationship("Subscription")

def __eq__(self, other):
return str(self.id) == str(other.id)
return isinstance(other, ClientApplication) and str(self.id) == str(other.id)

@staticmethod
def get_by_id(session, client_id):
Expand Down

0 comments on commit c876798

Please sign in to comment.