mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
FIX: Prevent creating duplicate cable types
This commit is contained in:
@@ -277,6 +277,9 @@ class CableTypeCreate(generic.CreateView):
|
||||
|
||||
return context
|
||||
|
||||
def get_success_url(self):
|
||||
return reverse("cable_type_detail", kwargs={"pk": self.object.pk })
|
||||
|
||||
class CableTypeUpdate(generic.UpdateView):
|
||||
model = models.CableType
|
||||
template_name = "cable_type_form.html"
|
||||
@@ -287,3 +290,6 @@ class CableTypeUpdate(generic.UpdateView):
|
||||
context["edit"] = True
|
||||
|
||||
return context
|
||||
|
||||
def get_success_url(self):
|
||||
return reverse("cable_type_detail", kwargs={"pk": self.object.pk })
|
||||
|
||||
Reference in New Issue
Block a user