Skip to content
Snippets Groups Projects
Verified Commit 715bce4d authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Fix lint

parent 53fe43d7
No related branches found
No related tags found
1 merge request!66Do release 3.1
Pipeline #137635 passed with warnings
......@@ -208,6 +208,17 @@ class LiveDocument(ExtensiblePolymorphicModel):
default=False, verbose_name=_("Was the last update triggered manually?"), editable=False
)
class Meta:
verbose_name = _("Live document")
verbose_name_plural = _("Live documents")
def __str__(self) -> str:
return self.name
def save(self, *args, **kwargs):
with reversion.create_revision():
super().save(*args, **kwargs)
@property
def last_version(self) -> Optional[Revision]:
"""Get django-reversion version of last file update."""
......@@ -240,10 +251,6 @@ class LiveDocument(ExtensiblePolymorphicModel):
"""Return OAuth2 scope name to access PDF file via API."""
return f"{self.SCOPE_PREFIX}_{self.slug}"
def save(self, *args, **kwargs):
with reversion.create_revision():
super().save(*args, **kwargs)
def get_context_data(self) -> dict[str, Any]:
"""Get context to pass to the PDF template."""
return {}
......@@ -264,10 +271,3 @@ class LiveDocument(ExtensiblePolymorphicModel):
self.last_update_triggered_manually = triggered_manually
self.current_file.save(self.filename, file_object.file.file)
self.save()
def __str__(self) -> str:
return self.name
class Meta:
verbose_name = _("Live document")
verbose_name_plural = _("Live documents")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment