Skip to content

Commit

Permalink
chore: disable editing resource and apikey
Browse files Browse the repository at this point in the history
  • Loading branch information
djs0109 committed Nov 8, 2022
1 parent e245693 commit 0ee2ac2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Entirety/devices/views/servicegroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ def get(self, request: HttpRequest, *args, **kwargs):

# disable editing the basic information
basic_info = ServiceGroupBasic(initial=service_group_dict)
basic_info.fields["resource"].widget.attrs["readonly"] = True
basic_info.fields["apikey"].widget.attrs["readonly"] = True

if service_group_dict.get("attributes"):
attributes = Attributes(
Expand Down

0 comments on commit 0ee2ac2

Please sign in to comment.