Removed the redundant "default_ie_account_code_text" pseudo property from the Options class.

This commit is contained in:
依瑪貓 2023-04-08 07:26:36 +08:00
parent e9824808ec
commit 4a4cf1ea40
2 changed files with 1 additions and 12 deletions

View File

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

View File

@ -123,17 +123,6 @@ class Options:
""" """
self.__set_option("default_ie_account", value) self.__set_option("default_ie_account", value)
@property
def default_ie_account_code_text(self) -> str:
"""Returns the text of the default currency code.
:return: The text of the default currency code.
"""
code: str = self.default_ie_account_code
if code == CurrentAccount.CURRENT_AL_CODE:
return str(CurrentAccount.current_assets_and_liabilities())
return str(CurrentAccount(Account.find_by_code(code)))
@property @property
def default_ie_account(self) -> CurrentAccount: def default_ie_account(self) -> CurrentAccount:
"""Returns the default account code for the income and expenses log. """Returns the default account code for the income and expenses log.