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

Fix filter by relationships #52

Merged
merged 4 commits into from
Jan 18, 2024
Merged

Fix filter by relationships #52

merged 4 commits into from
Jan 18, 2024

Conversation

CosmoV
Copy link
Collaborator

@CosmoV CosmoV commented Nov 30, 2023

No description provided.

),
[],
)
for cast_type in [field.type_ for field in fields]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

мне кажется немного странным такое решение. почему бы не сделать так?

for field for field in fields:
    cast_type = field.type_

и отдельный вопрос: а мы тут casted_value перезаписываем каждый раз в цикле? не нужно куда-то сохранить полученное значение? или нам нужно только последнее? мб как-то прокомментировать в коде?

Copy link
Collaborator Author

@CosmoV CosmoV Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

почему бы не сделать так?

Да, так будет лучше

а мы тут casted_value перезаписываем каждый раз в цикле?

Это оригинальный подход, поведение которого я не менял. Звучит разумно останавливать цикл на первом успешном касте

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

если ничего не сломается

@CosmoV CosmoV force-pushed the fix-filter-by-relationships branch from 4984137 to 79fb3b0 Compare January 16, 2024 04:09
@CosmoV CosmoV force-pushed the fix-filter-by-relationships branch from 3aa1a60 to 3fae8f0 Compare January 16, 2024 04:11
@mahenzon mahenzon merged commit d5ae48c into main Jan 18, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants