Skip to content

Commit

Permalink
fix: hide RootObject.deprecated_name
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rger committed Mar 19, 2024
1 parent f09862b commit 0afdb49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions apis_ontology/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@


class LegacyStuffMixinForm(GenericModelForm):
class Meta(GenericModelForm.Meta):
exclude = ["deprecated_name"]

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

Expand All @@ -12,9 +15,9 @@ def __init__(self, *args, **kwargs):
class PersonForm(LegacyStuffMixinForm):
field_order = ["first_name", "name", "start_date_written", "end_date_written", "status", "collection", "gender"]

class Meta(GenericModelForm.Meta):
class Meta(LegacyStuffMixinForm.Meta):
model = Person
exclude = ["published"]
exclude = ["published", "deprecated_name"]


class PlaceForm(LegacyStuffMixinForm):
Expand Down
2 changes: 1 addition & 1 deletion apis_ontology/templates/generic/partials/object_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block objecttable %}
{% modeldict object as d %}
{% for key, value in d.items %}
{% with "references notes published review rootobject_ptr" as list %}
{% with "references notes published review rootobject_ptr deprecated_name" as list %}
{% if key.name not in list.split %}
<tr>
<th>{{ key.verbose_name }}</th>
Expand Down

0 comments on commit 0afdb49

Please sign in to comment.