projects
/
pgweb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f499a1e
)
Fix model diffing to be compatible with both 1.8 and 1.11
author
Magnus Hagander
<magnus@hagander.net>
Sat, 10 Mar 2018 15:58:47 +0000
(10:58 -0500)
committer
Magnus Hagander
<magnus@hagander.net>
Sat, 10 Mar 2018 15:58:47 +0000
(10:58 -0500)
pgweb/util/signals.py
patch
|
blob
|
blame
|
history
diff --git
a/pgweb/util/signals.py
b/pgweb/util/signals.py
index 79ce509f2c602e83291b9d607ee5c63116c7b1b0..07742219b142b87b832d15ef7f1e005a14f1fbf8 100644
(file)
--- a/
pgweb/util/signals.py
+++ b/
pgweb/util/signals.py
@@
-52,7
+52,7
@@
def _get_all_notification_fields(obj):
def _get_attr_value(obj, fieldname):
# see if this is a Many-to-many field. If yes, we want to print
# it out as a pretty list
- if isinstance(obj._meta.get_field
_by_name(fieldname)[0]
, models.ManyToManyField):
+ if isinstance(obj._meta.get_field
(fieldname)
, models.ManyToManyField):
# XXX: Changes to ManyToMany fields can't be tracked here :(
# For now, we have no good way to deal with it so, well, don't.
# (trying to get the value will return None for it)