moved unnecessary reassignment

This commit is contained in:
Gani Georgiev 2024-12-12 12:11:47 +02:00
parent e51456bce2
commit 9490a220bc
1 changed files with 3 additions and 2 deletions

View File

@ -1456,12 +1456,13 @@ func cascadeRecordDelete(app App, mainRecord *Record, refs map[*Collection][]Fie
for _, refCollection := range sortedRefKeys {
fields, ok := refs[refCollection]
if refCollection.IsView() || !ok {
if !ok || refCollection.IsView() {
continue // skip missing or view collections
}
for _, field := range fields {
recordTableName := inflector.Columnify(refCollection.Name)
for _, field := range fields {
prefixedFieldName := recordTableName + "." + inflector.Columnify(field.GetName())
query := app.RecordQuery(refCollection)