From 55aa56bf4ba620d746b64ce6051096b142439392 Mon Sep 17 00:00:00 2001 From: Lorenz Herzberger Date: Thu, 14 Apr 2022 12:58:08 +0200 Subject: [PATCH] added comments to backend get_asset function, removed duplicate Signed-off-by: Lorenz Herzberger --- planetmint/backend/localmongodb/query.py | 3 ++- planetmint/backend/query.py | 12 ------------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/planetmint/backend/localmongodb/query.py b/planetmint/backend/localmongodb/query.py index 03a7b8e..c27dd37 100644 --- a/planetmint/backend/localmongodb/query.py +++ b/planetmint/backend/localmongodb/query.py @@ -72,6 +72,7 @@ def store_assets(conn, assets): .insert_many(assets, ordered=False)) +# TODO: pass filter/projection in function call this is not the expected behaviour for a function called get_asset @register_query(LocalMongoDBConnection) def get_asset(conn, asset_id): try: @@ -81,7 +82,7 @@ def get_asset(conn, asset_id): except IndexError: pass - +# TODO: pass filter/projection in function call this is not the expected behaviour for a function called get_assets @register_query(LocalMongoDBConnection) def get_assets(conn, asset_ids): return conn.run( diff --git a/planetmint/backend/query.py b/planetmint/backend/query.py index a2df194..c9da238 100644 --- a/planetmint/backend/query.py +++ b/planetmint/backend/query.py @@ -202,18 +202,6 @@ def get_metadata(connection, transaction_ids): raise NotImplementedError -@singledispatch -def get_assets(connection, asset_ids): - """Get a list of assets from the assets table. - Args: - asset_ids (list): a list of ids for the assets to be retrieved from - the database. - Returns: - assets (list): the list of returned assets. - """ - raise NotImplementedError - - @singledispatch def get_txids_filtered(connection, asset_ids, operation=None): """Return all transactions for a particular asset id and optional operation.