Skip to content
Snippets Groups Projects
Commit a12fdd2d authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

model: adapt to the renaming of model.TargetType to model.SnapshotTargetType

parent c61cb817
No related branches found
No related tags found
1 merge request!433model: adapt to the renaming of model.TargetType to model.SnapshotTargetType
Pipeline #8861 passed
swh.core[http] >= 0.4
swh.loader.core >= 0.0.71
swh.scheduler >= 0.7.0
swh.model >= 0.3.8
swh.model >= 6.13.0
swh.auth[django] >= 0.5.3
swh.storage >= 0.28.0
......@@ -2,4 +2,4 @@
# Server dependencies go to requirements-swh-server.txt instead.
swh.core[http] >= 3.0.0
swh.model >= 4.4.0
swh.model >= 6.13.0
......@@ -8,7 +8,7 @@ from typing import Dict, Optional
from swh.deposit.client import PrivateApiDepositClient
from swh.model.hashutil import hash_to_bytes, hash_to_hex
from swh.model.model import SnapshotBranch, TargetType
from swh.model.model import SnapshotBranch, SnapshotTargetType
from swh.storage.algos.snapshot import snapshot_get_all_branches
CLIENT_TEST_CONFIG = {
......@@ -92,7 +92,7 @@ def decode_target(branch: Optional[SnapshotBranch]) -> Optional[Dict]:
return None
target_type = branch.target_type
if target_type == TargetType.ALIAS:
if target_type == SnapshotTargetType.ALIAS:
decoded_target = branch.target.decode("utf-8")
else:
decoded_target = hash_to_hex(branch.target)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment