fix missing imports

This commit is contained in:
Nick Sweeting 2020-06-30 05:55:34 -04:00
parent e6830284c5
commit df593dea0a
3 changed files with 10 additions and 3 deletions

View file

@ -25,10 +25,12 @@ class Snapshot(models.Model):
def __repr__(self) -> str:
return f'[{self.timestamp}] {self.url[:64]} ({self.title[:64]})'
title = self.title or '-'
return f'[{self.timestamp}] {self.url[:64]} ({title[:64]})'
def __str__(self) -> str:
return f'[{self.timestamp}] {self.url[:64]} ({self.title[:64]})'
title = self.title or '-'
return f'[{self.timestamp}] {self.url[:64]} ({title[:64]})'
@classmethod
def from_json(cls, info: dict):