Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ayobi committed Feb 5, 2024
1 parent a69d78b commit 8d68fc6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
3 changes: 1 addition & 2 deletions microsetta_private_api/db/patches/0122.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ CREATE TABLE ag.account_removal_log (
-- user makes multiple requests.
disposition DISPOSITION_TYPE,
requested_on timestamptz,
reviewed_on timestamptz default current_timestamp,
delete_reason VARCHAR
reviewed_on timestamptz default current_timestamp
);
7 changes: 7 additions & 0 deletions microsetta_private_api/db/patches/0136.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- Feb 5, 2024
-- Add delete_reason to ag.account_removal_log
ALTER TABLE ag.account_removal_log
ADD COLUMN delete_reason VARCHAR;

COMMENT ON COLUMN ag.account_removal_log.delete_reason
IS 'Reason the admin gave for deleting the account.';
8 changes: 3 additions & 5 deletions microsetta_private_api/repo/removal_queue_repo.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from microsetta_private_api.repo.base_repo import BaseRepo
from microsetta_private_api.exceptions import RepoException
from microsetta_private_api.model.removal_queue_requests \
import RemovalQueueRequest


class RemovalQueueRepo(BaseRepo):
Expand All @@ -17,9 +15,9 @@ def _check_account_is_admin(self, admin_email):
return False if count == 0 else True

def _row_to_removal(self, r):
return RemovalQueueRequest(r['id'], r['account_id'], r['email'],
r['first_name'], r['last_name'],
r['requested_on'])
return self.__class__(r['id'], r['account_id'], r['email'],
r['first_name'], r['last_name'],
r['requested_on'])

def get_all_account_removal_requests(self):
with self._transaction.dict_cursor() as cur:
Expand Down

0 comments on commit 8d68fc6

Please sign in to comment.