Skip to content

Commit

Permalink
Hotfix to resolve filename
Browse files Browse the repository at this point in the history
  • Loading branch information
rexruan committed Aug 26, 2024
1 parent 8b6eb65 commit b35bd6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/lib/load_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def run_swegram(language: str, **kwargs) -> List[Dict[str, Any]]:
input_dir=Path(output_dir), language=language, include_tags=[], exclude_tags=[], parsed=parse
)
timestamp = datetime.now(tz=pytz.timezone("Europe/Stockholm")).strftime("%Y-%m-%d %H:%M:%S")
filename = kwargs.get("filename", f"Pasted at {timestamp}")
filename = kwargs.get("filename", f"Pasted at {timestamp}.txt")
return [{
**_serialize_item(text), **states, "filename": generate_filename(filename, index)}
for index, text in enumerate(texts, 1)
Expand Down

0 comments on commit b35bd6d

Please sign in to comment.