From 4065167afc749a053e90c8a403cc6d580a0696a4 Mon Sep 17 00:00:00 2001 From: Tomasz Bartosiak <tomasz.bartosiak@gmail.com> Date: Tue, 4 Dec 2018 12:52:30 +0100 Subject: [PATCH] Changing script -- possible re-iteration --- semantics/management/commands/connect_noun_lexical_units.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/semantics/management/commands/connect_noun_lexical_units.py b/semantics/management/commands/connect_noun_lexical_units.py index 28cd972..b53ae07 100644 --- a/semantics/management/commands/connect_noun_lexical_units.py +++ b/semantics/management/commands/connect_noun_lexical_units.py @@ -22,6 +22,8 @@ def connect_nouns(): for entry in entries: lus = LexicalUnit.objects.filter(base=entry.name, pos=u'rzeczownik') for lu in lus: - lu.entry = entry - lu.save() + if lu.entry is None: + print lu.base, lu.sense + lu.entry = entry + lu.save() -- libgit2 0.22.2