+
% for button in xref_buttons:
${button}
% endfor
diff --git a/tailbone/views/master.py b/tailbone/views/master.py
index 176ff672..7a1eff98 100644
--- a/tailbone/views/master.py
+++ b/tailbone/views/master.py
@@ -1441,8 +1441,8 @@ class MasterView(View):
changed_raw = app.render_datetime(app.localtime(txn.issued_at, from_utc=True))
changed_ago = app.render_time_ago(app.make_utc() - txn.issued_at)
- changed_by = str(txn.user)
- if self.request.has_perm('users.view'):
+ changed_by = str(txn.user or '')
+ if self.request.has_perm('users.view') and txn.user:
changed_by = tags.link_to(changed_by, self.request.route_url('users.view', uuid=txn.user.uuid))
return {
@@ -4961,10 +4961,16 @@ class MasterView(View):
def make_diff(self, old_data, new_data, **kwargs):
return diffs.Diff(old_data, new_data, **kwargs)
+ def get_version_diff_factory(self, **kwargs):
+ if hasattr(self, 'version_diff_factory'):
+ return self.version_diff_factory
+ return diffs.VersionDiff
+
def make_version_diff(self, version, *args, **kwargs):
if 'title' not in kwargs:
kwargs['title'] = self.title_for_version(version)
- return diffs.VersionDiff(version, *args, **kwargs)
+ factory = self.get_version_diff_factory()
+ return factory(version, *args, **kwargs)
##############################
# Configuration Views