1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2024-11-25 01:16:21 +02:00

added extra table name checks in the overwritten dao hooks in case of duplicated ids

This commit is contained in:
Gani Georgiev 2023-04-12 16:46:08 +03:00
parent c77467a6a2
commit a77b62e5bd

View File

@ -755,7 +755,7 @@ func (form *RecordUpsert) Submit(interceptors ...InterceptorFunc[*models.Record]
}
}
if m.GetId() == form.record.GetId() {
if m.TableName() == form.record.TableName() && m.GetId() == form.record.GetId() {
return form.processFilesToUpload()
}
@ -769,7 +769,7 @@ func (form *RecordUpsert) Submit(interceptors ...InterceptorFunc[*models.Record]
}
}
if m.GetId() == form.record.GetId() {
if m.TableName() == form.record.TableName() && m.GetId() == form.record.GetId() {
return form.processFilesToUpload()
}