fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change field length.
[redakcja.git]
/
src
/
catalogue
/
wikidata.py
diff --git
a/src/catalogue/wikidata.py
b/src/catalogue/wikidata.py
index
90f1a5c
..
b5ce07b
100644
(file)
--- a/
src/catalogue/wikidata.py
+++ b/
src/catalogue/wikidata.py
@@
-159,7
+159,12
@@
class WikidataModel(models.Model):
wdvalue = wdvalue.label.get(language, str(wdvalue.label))
if not skip_set:
wdvalue = wdvalue.label.get(language, str(wdvalue.label))
if not skip_set:
- setattr(self, attname, wdvalue)
+ try:
+ wdvalue = model_field.to_python(wdvalue)
+ except:
+ pass
+ else:
+ setattr(self, attname, wdvalue)
def wikidata_link(self):
if self.wikidata:
def wikidata_link(self):
if self.wikidata: