Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/avoid calulation str #64

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions calculation/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,13 @@ def resolve_calculation_rules(parent, info, **kwargs):
if calculation or calcrule_type:
list_cr = []
for cr in CALCULATION_RULES:
calculation = f'{calculation}'
if (
(
calculation and
UUID(cr.uuid) == UUID(calculation) and
UUID(cr.uuid) == UUID(str(calculation)) and
(calcrule_type == cr.type or calcrule_type is None)
) or (
calculation == 'None' and calcrule_type == cr.type
not calculation and calcrule_type == cr.type
)
):
list_cr = _append_to_calcrule_list(list_cr, cr)
Expand Down
Loading