fixed history allowing adding the same clan twice
This commit is contained in:
@@ -58,16 +58,14 @@ def add_history(uri: ClanURI) -> list[HistoryEntry]:
|
|||||||
found = True
|
found = True
|
||||||
entry.last_used = datetime.datetime.now().isoformat()
|
entry.last_used = datetime.datetime.now().isoformat()
|
||||||
|
|
||||||
if found:
|
if not found:
|
||||||
break
|
flake = inspect_flake(path, machine)
|
||||||
|
flake.flake_url = str(flake.flake_url)
|
||||||
flake = inspect_flake(path, machine)
|
history = HistoryEntry(
|
||||||
flake.flake_url = str(flake.flake_url)
|
flake=flake,
|
||||||
history = HistoryEntry(
|
last_used=datetime.datetime.now().isoformat(),
|
||||||
flake=flake,
|
)
|
||||||
last_used=datetime.datetime.now().isoformat(),
|
logs.append(history)
|
||||||
)
|
|
||||||
logs.append(history)
|
|
||||||
|
|
||||||
with locked_open(user_history_file(), "w+") as f:
|
with locked_open(user_history_file(), "w+") as f:
|
||||||
f.write(json.dumps(logs, cls=EnhancedJSONEncoder, indent=4))
|
f.write(json.dumps(logs, cls=EnhancedJSONEncoder, indent=4))
|
||||||
|
|||||||
Reference in New Issue
Block a user