Skip to content

Commit

Permalink
bugfixed category validation for empty values
Browse files Browse the repository at this point in the history
  • Loading branch information
dnbasta committed Mar 25, 2024
1 parent 9cff2b6 commit fbd488f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ynabtransactionadjuster/adjuster.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@ def adjust_single(self, original: OriginalTransaction, adjust_func: Callable) ->
raise AdjustError(f"Error while adjusting {original.as_dict()}") from e

def validate_category(self, category: Category):
try:
if category:
self._categories.fetch_by_id(category.id)
except NoMatchingCategoryError as e:
if category.name not in ('Split', 'Uncategorized'):
raise e

@staticmethod
def validate_attributes(modifier: TransactionModifier):
Expand Down

0 comments on commit fbd488f

Please sign in to comment.