Skip to content
Snippets Groups Projects
Commit 657e3a7c authored by Ondrej Rehounek's avatar Ondrej Rehounek Committed by jan.bednarik
Browse files

district: split image path from hash...

parent 6c167d00
Branches
No related tags found
2 merge requests!442Release,!432Feature/majak imports
...@@ -225,7 +225,7 @@ def get_or_create_image(path, file_path, collection, repo_name) -> Image or None ...@@ -225,7 +225,7 @@ def get_or_create_image(path, file_path, collection, repo_name) -> Image or None
img_name = file_path.split("/")[-1] img_name = file_path.split("/")[-1]
img_assets_folder = repo_name.split(".")[0] # TODO make as form field img_assets_folder = repo_name.split(".")[0] # TODO make as form field
img_url = "https://a.pirati.cz/{}/img/{}".format( img_url = "https://a.pirati.cz/{}/img/{}".format(
img_assets_folder, file_path img_assets_folder, file_path.split("#")[0]
) )
img_path = os.path.join(path, img_name) img_path = os.path.join(path, img_name)
try: try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment