Skip to content

Commit

Permalink
corrected missing attribute on clear genders callback
Browse files Browse the repository at this point in the history
  • Loading branch information
Bikatr7 committed Jun 16, 2024
1 parent 3dc75f1 commit 902e19e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,7 @@ def set_genders_file(input_gender_file:gr.File):
##----------------start-of-clear_genders_file()---------------------------------------------------------------------------------------------------------------------------------------------------------------------------


def clear_genders_file(temp_file) -> None:
def clear_genders_file(temp_file:gr.File) -> None:

"""
Expand All @@ -1460,7 +1460,7 @@ def clear_genders_file(temp_file) -> None:
with open(FileEnsurer.config_translation_genders_path, "w", encoding="utf-8") as f:
json.dump(FileEnsurer.DEFAULT_GENDER_SETTINGS, f, indent=4)

with open(temp_file, "w", encoding="utf-8") as f:
with open(temp_file.name, "w", encoding="utf-8") as f: # type: ignore
json.dump(FileEnsurer.DEFAULT_GENDER_SETTINGS, f, indent=4)

except:
Expand Down

0 comments on commit 902e19e

Please sign in to comment.