add settings version to version column in snapshots log

This commit is contained in:
Cayo Puigdefabregas 2022-11-30 16:46:10 +01:00
parent 7c6290bd89
commit a2626a0b58
2 changed files with 9 additions and 1 deletions

View file

@ -84,6 +84,14 @@ class SnapshotsLog(Thing):
except AttributeError:
return ''
def get_version(self):
if not self.snapshot:
return self.version
settings_version = self.snapshot.settings_version or ''
settings_version = "".join([x[0] for x in settings_version.split(' ') if x])
return "{} ({})".format(self.version, settings_version)
class PlaceholdersLog(Thing):
"""A Placeholder log."""

View file

@ -87,7 +87,7 @@
{% endif %}
</td>
<td>
{{ snap.version }}
{{ snap.get_version() }}
</td>
<td>
{% if snap.get_device() %}