Updates to the Update Group logic to have a cleaner output

This commit is contained in:
2026-07-28 21:23:21 +02:00
parent aa2ad37cd7
commit 2aee36cc92
2 changed files with 9 additions and 4 deletions
+4
View File
@@ -6737,6 +6737,8 @@ def update_group():
{'$set': shared_update} {'$set': shared_update}
) )
app.logger.debug(f"Individual Codes: {individual_items}")
# B. Apply Unique Codes to specific items # B. Apply Unique Codes to specific items
# We iterate through the provided list to update the specific code for each ID # We iterate through the provided list to update the specific code for each ID
for item in individual_items: for item in individual_items:
@@ -6750,6 +6752,8 @@ def update_group():
) )
client.close() client.close()
app.logger.debug("Success When Updating the Item")
flash("Objecte wurden erfolgreich Bearbeitet", "success")
return jsonify({'success': True, 'message': 'Gruppe und individuelle Codes aktualisiert'}) return jsonify({'success': True, 'message': 'Gruppe und individuelle Codes aktualisiert'})
except Exception as e: except Exception as e:
+2 -1
View File
@@ -1371,7 +1371,8 @@
await loadLibraryItems(); // Daten neu laden await loadLibraryItems(); // Daten neu laden
// renderTable(); // Ggf. Tabelle neu rendern // renderTable(); // Ggf. Tabelle neu rendern
} else { } else {
alert('Fehler: ' + result.message); closeEditLibraryModal();
await loadLibraryItems();
} }
} catch (error) { } catch (error) {
console.error('Update failed:', error); console.error('Update failed:', error);