laminlabs / lamindb-setup

Setup & configure LaminDB.
Apache License 2.0
4 stars 2 forks source link

Refactor delete_instance_by_id and delete_instance_by_slug #690

Closed falexwolf closed 5 months ago

falexwolf commented 5 months ago

I think there is a simple solution here to avoid DRY:

def delete_instance(identifier: Union[UUID, str]):
    if isinstance(identifier, UUID):
         # id logic
   else:
        # slug logic
bpenteado commented 5 months ago

Fixed here: https://github.com/laminlabs/lamindb-setup/pull/691