Skip to content

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
@m-antonov m-antonov deleted the fix-filter-by-relationships branch March 13, 2025 11:06
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.

3 participants