diff --git a/swh/storage/converters.py b/swh/storage/converters.py --- a/swh/storage/converters.py +++ b/swh/storage/converters.py @@ -38,7 +38,7 @@ return author -def db_to_author(id, fullname, name, email): +def db_to_author(fullname, name, email): """Convert the DB representation of an author to a swh-model author. Args: @@ -51,12 +51,7 @@ dict: a dictionary with four keys: id, fullname, name and email, or None if the id is None """ - - if id is None: - return None - return { - 'id': id, 'fullname': fullname, 'name': name, 'email': email, @@ -208,7 +203,6 @@ representation.""" author = db_to_author( - db_revision['author_id'], db_revision['author_fullname'], db_revision['author_name'], db_revision['author_email'], @@ -220,7 +214,6 @@ ) committer = db_to_author( - db_revision['committer_id'], db_revision['committer_fullname'], db_revision['committer_name'], db_revision['committer_email'], @@ -292,7 +285,6 @@ """ author = db_to_author( - db_release['author_id'], db_release['author_fullname'], db_release['author_name'], db_release['author_email'], diff --git a/swh/storage/db.py b/swh/storage/db.py --- a/swh/storage/db.py +++ b/swh/storage/db.py @@ -298,8 +298,7 @@ 'committer_email', 'metadata', 'synthetic', ] - revision_get_cols = revision_add_cols + [ - 'author_id', 'committer_id', 'parents'] + revision_get_cols = revision_add_cols + ['parents'] def origin_visit_add(self, origin, ts, type, cur=None): """Add a new origin_visit for origin origin at timestamp ts with @@ -782,7 +781,7 @@ 'date_neg_utc_offset', 'name', 'comment', 'synthetic', 'author_fullname', 'author_name', 'author_email', ] - release_get_cols = release_add_cols + ['author_id'] + release_get_cols = release_add_cols def release_get_from_list(self, releases, cur=None): cur = self._cursor(cur) diff --git a/swh/storage/in_memory.py b/swh/storage/in_memory.py --- a/swh/storage/in_memory.py +++ b/swh/storage/in_memory.py @@ -1688,7 +1688,6 @@ person_id = self._objects[key][0][1] p = self._persons[person_id-1] person.update(p.items()) - person['id'] = person_id @staticmethod def _content_key(content):