Replaced the "default_currency_text" pseudo property with the "default_currency" pseudo property in the Options class.

This commit is contained in:
依瑪貓 2023-04-08 07:31:28 +08:00
parent 4a4cf1ea40
commit 71a20cba29
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ First written: 2023/3/22
<tbody>
<tr>
<th scope="row">{{ A_("Default Currency") }}</th>
<td>{{ obj.default_currency_text }}</td>
<td>{{ obj.default_currency }}</td>
</tr>
<tr>
<th scope="row">{{ A_("Default Account for the Income and Expenses Log") }}</th>

View File

@ -99,12 +99,12 @@ class Options:
self.__set_option("default_currency_code", value)
@property
def default_currency_text(self) -> str:
def default_currency(self) -> Currency:
"""Returns the text of the default currency code.
:return: The text of the default currency code.
"""
return str(db.session.get(Currency, self.default_currency_code))
return db.session.get(Currency, self.default_currency_code)
@property
def default_ie_account_code(self) -> str: