(Added) sync recover function.

Fixed label_prompt returning list.
This commit is contained in:
2023-03-04 12:37:11 +02:00
parent fc3daff6cf
commit e9e4162cac
5 changed files with 78 additions and 2 deletions
+13
View File
@@ -93,6 +93,19 @@ class Destination(BaseModel):
def __str__(self) -> str:
return f"{self.path}"
@staticmethod
def get_all(label:str|None = None):
"""
Return all destiantions of the source.
"""
if label is None:
return []
src = Source.get_source(label)
if src is None:
return []
return src.destinations
class Group(BaseModel):
label = CharField(unique=True)