projects
/
pgweb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de9de4c
)
Handle migrated records with NULL in them when building diff
author
Magnus Hagander
<magnus@hagander.net>
Mon, 7 Nov 2016 19:17:58 +0000
(20:17 +0100)
committer
Magnus Hagander
<magnus@hagander.net>
Mon, 7 Nov 2016 19:17:58 +0000
(20:17 +0100)
pgweb/util/signals.py
patch
|
blob
|
blame
|
history
diff --git
a/pgweb/util/signals.py
b/pgweb/util/signals.py
index 4fbe96dfaccdd536737e4c25304f07b3ba9f0471..76d1c747ddb10024cfbf70625d0307c780a4783a 100644
(file)
--- a/
pgweb/util/signals.py
+++ b/
pgweb/util/signals.py
@@
-60,7
+60,8
@@
def _get_attr_value(obj, fieldname):
# access the primary key
return "<not available yet>"
return u", ".join(map(lambda x: unicode(x), getattr(obj, fieldname).all()))
- return getattr(obj, fieldname)
+ # Return the value, or an empty tring if it's NULL (migrated records)
+ return getattr(obj, fieldname) or ''
def _get_full_text_representation(obj):
fieldlist = _get_all_notification_fields(obj)