diff --git a/catalog/common/models.py b/catalog/common/models.py
index e020f3f6..564f5bce 100644
--- a/catalog/common/models.py
+++ b/catalog/common/models.py
@@ -736,7 +736,7 @@ class Item(PolymorphicModel):
if not getattr(self, k) or ignore_existing_content:
setattr(self, k, v)
elif k in self.METADATA_MERGE_LIST:
- setattr(self, k, uniq((v or []) + getattr(self, k, [])))
+ setattr(self, k, uniq(getattr(self, k, []) + (v or [])))
if p.cover and (not self.has_cover() or ignore_existing_content):
self.cover = p.cover
diff --git a/catalog/templates/catalog_history.html b/catalog/templates/catalog_history.html
index bd090cea..32496156 100644
--- a/catalog/templates/catalog_history.html
+++ b/catalog/templates/catalog_history.html
@@ -21,16 +21,43 @@
main>div {
margin-bottom: 4rem;
}
+
+ /* diff viewer */
+ .diffview pre {
+ white-space: pre-wrap;
+ word-wrap: break-word;
+ word-break: break-all;
+ background: unset;
+ }
+ .diffview td {
+ vertical-align: top;
+ }
+ .diffview td div{
+ display: none;
+ }
+
+
{% include "_header.html" %}
{{ item.display_title }} - {% trans "revision history" %}
-
+
-
+
Field |
From |
To |
@@ -42,7 +69,7 @@
{% if request.user.is_staff or log.actor.preference.show_last_edit %}
- {{ log.actor.username }}
+ {{ log.actor.username|default:'-' }}
{% else %}
{% endif %}
@@ -51,10 +78,16 @@
|
{% for key, value in log.changes_dict.items %}
-
+
{{ key }} |
- {{ value.0|default:"-" }} |
- {{ value.1|default:"-" }} |
+
+ {{ value.0|default:"-" }}
+
+ |
+
+ {{ value.1|default:"-" }}
+
+ |
{% empty %}