diff options
author | Magnus Hagander | 2018-12-15 10:05:34 +0000 |
---|---|---|
committer | Magnus Hagander | 2018-12-15 10:05:34 +0000 |
commit | d3cbef33ecc739a7fea78ab21ea097178c204f91 (patch) | |
tree | b56248a4d520e13197491b53eb0b3feec2d0e3b6 /postgresqleu/util/diffablemodel.py | |
parent | f01500dcf70022e2d23b91c147a6254ac8c4e3b2 (diff) |
Replace usage of has_key()
It has been deprecated, and instead we should use "in" and "not in", so
make that change across the board.
Diffstat (limited to 'postgresqleu/util/diffablemodel.py')
-rw-r--r-- | postgresqleu/util/diffablemodel.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/postgresqleu/util/diffablemodel.py b/postgresqleu/util/diffablemodel.py index 8c4f68ab..94ad3e5f 100644 --- a/postgresqleu/util/diffablemodel.py +++ b/postgresqleu/util/diffablemodel.py @@ -26,7 +26,7 @@ class DiffableModel(object): # Many to many lookups if hasattr(self, 'map_manytomany_for_diff'): for k, v in diffs.items(): - if k in manytomanyfieldnames and self.map_manytomany_for_diff.has_key(k): + if k in manytomanyfieldnames and k in self.map_manytomany_for_diff: # Try to show the display name instead here newvalue = getattr(self, self.map_manytomany_for_diff[k]) diffs[k] = (v[0], newvalue) |