1
0
Fork 0

Fixed Link schema

This commit is contained in:
Angel Rey 2020-09-21 14:54:11 -05:00
parent 45775c607c
commit e06d3f9128

View file

@ -157,8 +157,7 @@ class Link:
assert isinstance(self.url, str) and '://' in self.url assert isinstance(self.url, str) and '://' in self.url
assert self.updated is None or isinstance(self.updated, datetime) assert self.updated is None or isinstance(self.updated, datetime)
assert self.title is None or (isinstance(self.title, str) and self.title) assert self.title is None or (isinstance(self.title, str) and self.title)
#for tag in self.tags.all(): assert self.tags is None or isinstance(self.tags, str)
# assert tag is None or isinstance(tag, TaggedItem)
assert isinstance(self.sources, list) assert isinstance(self.sources, list)
assert all(isinstance(source, str) and source for source in self.sources) assert all(isinstance(source, str) and source for source in self.sources)
assert isinstance(self.history, dict) assert isinstance(self.history, dict)