fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix.
[redakcja.git]
/
src
/
catalogue
/
wikidata.py
diff --git
a/src/catalogue/wikidata.py
b/src/catalogue/wikidata.py
index
b5ce07b
..
731e55f
100644
(file)
--- a/
src/catalogue/wikidata.py
+++ b/
src/catalogue/wikidata.py
@@
-164,6
+164,10
@@
class WikidataModel(models.Model):
except:
pass
else:
+ if isinstance(wdvalue, str):
+ max_length = getattr(model_field, 'max_length', None)
+ if max_length:
+ wdvalue = wdvalue[:max_length]
setattr(self, attname, wdvalue)
def wikidata_link(self):