X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/2caa6415139fe58938a62dca695639ba0cc86dda..c4426f18fdb50c224e8a5211a1766dcf261eaff8:/src/catalogue/wikidata.py diff --git a/src/catalogue/wikidata.py b/src/catalogue/wikidata.py index c6885705..88686b6e 100644 --- a/src/catalogue/wikidata.py +++ b/src/catalogue/wikidata.py @@ -11,9 +11,7 @@ from wikidata.datavalue import DatavalueError class WikidataMixin(models.Model): wikidata = models.CharField( max_length=255, - null=True, blank=True, - unique=True, help_text=_('If you have a Wikidata ID, like "Q1337", enter it and save.'), ) @@ -89,7 +87,11 @@ class WikidataAdminMixin: def wikidata_link(self, obj): if obj.wikidata: - return format_html('{wd}', wd=obj.wikidata) + return format_html( + '{wd}', + wd=obj.wikidata, + ) else: - return '' - wikidata_link.admin_order_field = 'wikidata' + return "" + + wikidata_link.admin_order_field = "wikidata"