fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
1c013c3
)
Obey length limits for wikidata import.
author
Radek Czajka
<rczajka@rczajka.pl>
Tue, 12 Nov 2024 10:58:08 +0000
(11:58 +0100)
committer
Radek Czajka
<rczajka@rczajka.pl>
Tue, 12 Nov 2024 10:58:08 +0000
(11:58 +0100)
src/catalogue/wikidata.py
patch
|
blob
|
history
diff --git
a/src/catalogue/wikidata.py
b/src/catalogue/wikidata.py
index
b5ce07b
..
84f899a
100644
(file)
--- a/
src/catalogue/wikidata.py
+++ b/
src/catalogue/wikidata.py
@@
-164,6
+164,9
@@
class WikidataModel(models.Model):
except:
pass
else:
except:
pass
else:
+ max_length = getattr(model_field, 'max_length', None)
+ if max_length:
+ wdvalue = wdvalue[:max_length]
setattr(self, attname, wdvalue)
def wikidata_link(self):
setattr(self, attname, wdvalue)
def wikidata_link(self):