mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-29 00:10:24 +01:00
added extra table name checks in the overwritten dao hooks in case of duplicated ids
This commit is contained in:
1 parent
c77467a6a2
commit
a77b62e5bd
1 file changed
+2
-2
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user