diff --git a/README.md b/README.md index 7f8680288d615002ad51e0a8dc2cf2e41d57f576..5869dccf2b8e87dc3cd5483def91d05b858f178f 100644 --- a/README.md +++ b/README.md @@ -82,3 +82,8 @@ Compiled application files will be located in `frontend/dist/`. export LOADING_THE_SLOWOSIEC_ONTOLOGY_HIERARCHY_DISABLED=true python manage.py db_import_relation_entries + +## Database update for free lexical units + + export LOADING_THE_SLOWOSIEC_ONTOLOGY_HIERARCHY_DISABLED=true + python manage.py db_import_potential_entry_2_lu_connections diff --git a/freelus/views.py b/freelus/views.py index 8b41de69c33b1e2af3e60759013bfa5cbd1f2e66..a9a9544509a9bf40a88dc92c20c68060b79c5205 100644 --- a/freelus/views.py +++ b/freelus/views.py @@ -60,6 +60,8 @@ def change_lus_in_slowal_frame(request): frame_lexical_units_to_add = request_lu_int_ids.difference(frame_lexical_units) for lu_id in frame_lexical_units_to_add: lu = LexicalUnit.objects.get(pk=lu_id) + entry.lexical_units.add(lu) + entry.lexical_units_count = entry.lexical_units_count + 1 frame.lexical_units.add(lu) if len(frame.lexical_units.all()) == 0: