Commit 026dda69 authored by Mickaël Desfrênes's avatar Mickaël Desfrênes
Browse files

remove deprecated function

parent 3357b121
Loading
Loading
Loading
Loading
+4 −15
Original line number Diff line number Diff line
@@ -1496,7 +1496,7 @@ def set_metas_to_collection(
    for meta_value in collection_instance.metadatacollectionvalue_set.filter(
        metadata__set=metadataset_instance
    ):
        remove_meta_from_collection(user, collection_id, meta_value.pk)
        remove_meta_value_from_collection(user, collection_id, meta_value.pk)

    # add metas
    for meta_dict in metas:
@@ -1556,12 +1556,12 @@ def add_meta_to_resource(


@_log_call
@_rpc_groups(["Deprecated"])
def remove_meta_from_collection(
@_rpc_groups(["Metadatas", "Collections"])
def remove_meta_value_from_collection(
    user: User, collection_id: int, meta_value_id: int
) -> bool:
    """
    DEPRECATED. Use remove_meta_value_from_collection instead.
    Remove a meta value from a collection given their ids.
    """
    query_set: Union[Iterator[Collection], QuerySet] = Collection.objects.filter(
        pk=collection_id, deleted_at__isnull=True
@@ -1577,17 +1577,6 @@ def remove_meta_from_collection(
    return False


@_log_call
@_rpc_groups(["Metadatas", "Collections"])
def remove_meta_value_from_collection(
    user: User, collection_id: int, meta_value_id: int
) -> bool:
    """
    Remove a meta value from a collection given their ids.
    """
    return remove_meta_from_collection(user, collection_id, meta_value_id)


@_log_call
@_rpc_groups(["Metadatas", "Collections"])
def add_meta_to_collection(