Skip to content

Commit

Permalink
Ensure empty full path is properly handled
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzaadi committed Feb 7, 2024
1 parent 061cfb1 commit 0ed7c97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elementary/monitor/fetchers/models/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def load_owners(cls, owners):
return cls._load_var_to_list(owners)

@validator("full_path", pre=True)
def format_full_path_sep(cls, full_path: Optional[str]) -> Optional[str]:
return posixpath.sep.join(full_path.split(os.path.sep)) if full_path else None
def format_full_path_sep(cls, full_path: Optional[str]) -> str:
return posixpath.sep.join(full_path.split(os.path.sep)) if full_path else ""

@validator("meta", pre=True)
def load_meta(cls, meta):
Expand Down

0 comments on commit 0ed7c97

Please sign in to comment.