From cf8358d14bf371847af6003fa3e822733ad097cd Mon Sep 17 00:00:00 2001 From: gluap Date: Sun, 26 Mar 2023 22:34:16 +0200 Subject: [PATCH] fix the road_usage issue dennis found. --- api/obs/api/db.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/obs/api/db.py b/api/obs/api/db.py index 4e870ca..5793558 100644 --- a/api/obs/api/db.py +++ b/api/obs/api/db.py @@ -166,6 +166,13 @@ class RoadUsage(Base): def __repr__(self): return f"" + def __hash__(self): + return int(self.hex_hash, 16) + + def __eq__(self, other): + return self.hex_hash == other.hex_hash + + NOW = text("NOW()")