Commit baa620e6 authored by Marko Kuder's avatar Marko Kuder

fix duplicating qa messages when using previous score

parent 33bf3bbc
......@@ -335,6 +335,8 @@ def score_by_sniffing_data(archival, resource, score_reasons, log):
# If the local copy does not exist, then it has not changed, as it would be downloaded in the last archival otherwise.
qa = QA.get_for_resource(resource.id)
if qa:
# prevent duplicate prefix text and fix old wrong duplicates
qa.openness_score_reason = qa.openness_score_reason.replace(u'Lokalna kopija ne obstaja, uporabljena prejšnja ocena: ', u'')
score_reasons.append(u'Lokalna kopija ne obstaja, uporabljena prejšnja ocena: ' + qa.openness_score_reason)
return (qa.openness_score, qa.format)
else:
......
Markdown is supported
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