mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-24 06:50:25 +02:00
added migration to normalize the system collection and field ids
This commit is contained in:
1 parent
b3d88349d7
commit
9e70c77736
9 files changed
+177
-9
No files matched your search
@@ -488,12 +488,13 @@ func (m *Collection) UnmarshalJSON(b []byte) error {
|
||||
minimal := &struct {
|
||||
Type string `json:"type"`
|
||||
Name string `json:"name"`
|
||||
Id string `json:"id"`
|
||||
}{}
|
||||
if err := json.Unmarshal(b, minimal); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
blank := NewCollection(minimal.Type, minimal.Name)
|
||||
blank := NewCollection(minimal.Type, minimal.Name, minimal.Id)
|
||||
*m = *blank
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user