diff --git a/trademark/lib/poiskznakov.py b/trademark/lib/poiskznakov.py index 0939d9e..53dfcb8 100644 --- a/trademark/lib/poiskznakov.py +++ b/trademark/lib/poiskznakov.py @@ -86,11 +86,13 @@ class TrademarkSearchAPI(): 'marks': ids, 'access_keys': keys } - print ids - print keys - data = self.send_request(request) - return data['records_list']['21']['records'] + try: + data = self.send_request(request) + + return data['records_list']['21']['records'] + except: + return None class SearchResultsThread(threading.Thread): diff --git a/trademark/models.py b/trademark/models.py index 98aba20..1844212 100644 --- a/trademark/models.py +++ b/trademark/models.py @@ -52,7 +52,7 @@ class Trademark(models.Model): ext_id = models.CharField(max_length=20, unique=True) application_id = models.IntegerField() cert_id = models.IntegerField() - owner = models.CharField(max_length=255) + owner = models.TextField() image_url = models.URLField(blank=True) nices = models.ManyToManyField(Nice) status = models.CharField(max_length=20)