From 28d07de930ceb914070e72c62974d27307576893 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Tue, 3 Jun 2014 23:05:20 -0400 Subject: [PATCH] Fix origin stuff. --- bitshift/codelet.py | 6 +++--- bitshift/database/__init__.py | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bitshift/codelet.py b/bitshift/codelet.py index 2defbf8..8fbdcfe 100644 --- a/bitshift/codelet.py +++ b/bitshift/codelet.py @@ -28,8 +28,8 @@ class Codelet(object): per available ratings (stars, forks, upvotes, etc.). :ivar symbols: (dict) Dictionary containing dictionaries of functions, classes, variable definitions, etc. - :ivar origin: (tuple) 3-tuple of (site_name, site_url, image_blob), as - added by the database. + :ivar origin: (tuple) 2-tuple of (site_name, site_url), as added by the + database. """ def __init__(self, name, code, filename, language, authors, url, @@ -72,7 +72,7 @@ class Codelet(object): self.date_modified = date_modified self.rank = rank self.symbols = symbols or {} - self.origin = origin or (None, None, None) + self.origin = origin or (None, None) def serialize(self): """ diff --git a/bitshift/database/__init__.py b/bitshift/database/__init__.py index b857ff8..e3cb3f2 100644 --- a/bitshift/database/__init__.py +++ b/bitshift/database/__init__.py @@ -120,8 +120,7 @@ class Database(object): url = row["origin_url_base"] + row["codelet_url"] else: url = row["codelet_url"] - origin = (row["origin_name"], row["origin_url"], - row["origin_image"]) + origin = (row["origin_name"], row["origin_url"]) authors = self._get_authors_for_codelet(cursor, codelet_id) symbols = self._get_symbols_for_code(cursor, code_id, tree) yield Codelet(