diff options
-rw-r--r-- | python/fatcat_web/forms.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/python/fatcat_web/forms.py b/python/fatcat_web/forms.py index b06788b8..13776d10 100644 --- a/python/fatcat_web/forms.py +++ b/python/fatcat_web/forms.py @@ -437,5 +437,9 @@ class EntityTomlForm(EntityEditForm): Initializes form with TOML version of existing entity """ etf = EntityTomlForm() - etf.toml.data = entity_to_toml(entity) + if entity.state == 'active': + pop_fields = ['ident', 'state', 'revision', 'redirect'] + else: + pop_fields = ['ident', 'state'] + etf.toml.data = entity_to_toml(entity, pop_fields=pop_fields) return etf |