[bugfix] Fix duplicating fields on profile edit (#1788)

* [bugfix] Fix duplicating fields on profile edit

* test non-duplicate fields
This commit is contained in:
tobi
2023-05-15 12:52:40 +02:00
committed by GitHub
parent e1b7ab2603
commit 17b9a937b1
3 changed files with 198 additions and 136 deletions

View File

@ -155,6 +155,7 @@ func (p *Processor) Update(ctx context.Context, account *gtsmodel.Account, form
}
// Process the raw fields we stored earlier.
account.Fields = make([]*gtsmodel.Field, 0, len(account.FieldsRaw))
for _, fieldRaw := range account.FieldsRaw {
field := &gtsmodel.Field{}