Skip to content

Commit

Permalink
Update load.py
Browse files Browse the repository at this point in the history
code where I get the value of the plant to be displayed is wrong.

I instead have to try and in the case of the plantname regardless because I call this function "update_last_scan_plant." in on_preferences_closed. with the old name which may be not a proper plant name.

the previous change here was because I tried to fix this functions behaviour after using the reset button. Said previous change instead made it so that every call of the update_last_scan_plant function call without an argument was equal to using the reset button just before. for the worth of the plant.
  • Loading branch information
Balvald committed Jan 7, 2023
1 parent 04190d4 commit 4276c39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion load.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,9 +717,10 @@ def update_last_scan_plant(entry=None):
plantname = str(plugin.AST_last_scan_plant.get().split(" (Worth: ")[0])
if entry is not None:
plantname = orgi.generaltolocalised(entry["Species"].lower())
try:
plantworth = vistagenomicsprices[plantname]
worthstring = f"{plantworth:,} Cr."
else:
except KeyError:
plantworth = None
worthstring = "N/A"
if plugin.AST_shorten_value.get():
Expand Down

1 comment on commit 4276c39

@Balvald
Copy link
Owner Author

@Balvald Balvald commented on 4276c39 Jan 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this commit concerns #35

Please sign in to comment.