Skip to content
Snippets Groups Projects
Commit 20e7547e authored by dcz's avatar dcz
Browse files

Free lu add to entry bugfix.

parent 6f7430fd
Branches
No related merge requests found
...@@ -82,3 +82,8 @@ Compiled application files will be located in `frontend/dist/`. ...@@ -82,3 +82,8 @@ Compiled application files will be located in `frontend/dist/`.
export LOADING_THE_SLOWOSIEC_ONTOLOGY_HIERARCHY_DISABLED=true export LOADING_THE_SLOWOSIEC_ONTOLOGY_HIERARCHY_DISABLED=true
python manage.py db_import_relation_entries 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
...@@ -60,6 +60,8 @@ def change_lus_in_slowal_frame(request): ...@@ -60,6 +60,8 @@ def change_lus_in_slowal_frame(request):
frame_lexical_units_to_add = request_lu_int_ids.difference(frame_lexical_units) frame_lexical_units_to_add = request_lu_int_ids.difference(frame_lexical_units)
for lu_id in frame_lexical_units_to_add: for lu_id in frame_lexical_units_to_add:
lu = LexicalUnit.objects.get(pk=lu_id) 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) frame.lexical_units.add(lu)
if len(frame.lexical_units.all()) == 0: if len(frame.lexical_units.all()) == 0:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment