You've already forked pocketbase
mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-09-16 09:36:20 +02:00
added extra table name checks in the overwritten dao hooks in case of duplicated ids
This commit is contained in:
@@ -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