fix: Rücksprung nach dem Erstellen einer Dokumentzuordnung korrigieren
This commit is contained in:
@@ -5,7 +5,7 @@ class DocumentationConfig(PluginConfig):
|
||||
name = "netbox_documentation"
|
||||
verbose_name = "Dokumentation"
|
||||
description = "Wiki und Office-Dokumentation direkt in NetBox"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
author = "NetBox Documentation Contributors"
|
||||
base_url = "documentation"
|
||||
min_version = "4.0.0"
|
||||
|
||||
@@ -110,6 +110,11 @@ class DocumentAssignment(NetBoxModel):
|
||||
def __str__(self):
|
||||
return f"{self.document} → {self.assigned_object}"
|
||||
|
||||
def get_absolute_url(self):
|
||||
# No separate detail page exists for an assignment. NetBox's generic
|
||||
# edit view nevertheless needs a valid URL for its success message.
|
||||
return reverse("plugins:netbox_documentation:documentassignment_list")
|
||||
|
||||
|
||||
def attachment_upload_path(instance, filename):
|
||||
return f"netbox_documentation/{instance.document_id}/{filename}"
|
||||
|
||||
Reference in New Issue
Block a user