aboutsummaryrefslogtreecommitdiff
path: root/internal/admin/api_entity.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/admin/api_entity.go')
-rw-r--r--internal/admin/api_entity.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/admin/api_entity.go b/internal/admin/api_entity.go
index 204c59e..04b9dca 100644
--- a/internal/admin/api_entity.go
+++ b/internal/admin/api_entity.go
@@ -230,6 +230,10 @@ func (s *AdminServer) entityCreate(w http.ResponseWriter, r *http.Request, c ent
c.fail(w, http.StatusBadRequest, c.invalidID())
return
}
+ // Editor-only keys never belong in the file (the update path drops them
+ // too); without this a GET->POST round trip poisons the YAML.
+ delete(m, "_path")
+ delete(m, "_raw")
if _, _, err := c.find(s, id); err == nil {
c.fail(w, http.StatusConflict, c.noun+" already exists")
return