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

deprecate rpc method

parent 8d4c410d
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -1381,12 +1381,12 @@ def add_meta_to_resource(
        return False


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


@_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)


@_rpc_groups(["Metadatas", "Collections"])
def add_meta_to_collection(
    user: User, collection_id: int, meta_id: int, meta_value: str, cascade: bool = False
@@ -2338,9 +2348,11 @@ def recycle_bin(user: User, project_id: int) -> List[Dict]:
    return results


@_rpc_groups(["Resources"])
def restore_resource(user: User, resource_id: int) -> bool:
    pass


@_rpc_groups(["Collections"])
def restore_collection(user: User, collection_id: int) -> bool:
    pass