Skip to content

Conversation

terencehonles
Copy link
Contributor

Description

addressing #8972 (comment)

@auvipy auvipy added the Cleanup label Apr 27, 2024
@auvipy auvipy merged commit e596f43 into encode:master Apr 27, 2024
@terencehonles terencehonles deleted the use-warnings-rather-than-logging branch May 7, 2024 12:03
@lovelydinosaur lovelydinosaur mentioned this pull request Jun 14, 2024
warnings.warn("max_value should be a Decimal instance.")
if self.min_value is not None and not isinstance(self.min_value, decimal.Decimal):
logger.warning("min_value in DecimalField should be Decimal type.")
warnings.warn("min_value should be a Decimal instance.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a stacklevel param so that python displays a trace with the faulty calling code rather than this line?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants