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 the issue of parameter concatenation when generating ORM with ins… #331

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

floodpillar
Copy link

@floodpillar floodpillar commented Mar 26, 2024

Before fixing the parameter concatenation:
d_price =
fields.DecimalField(max_digits=10, decimal_places=2null=True, )
p_price =
fields.DecimalField(max_digits=10, decimal_places=2null=True, )

After fixing the parameter concatenation:
d_price =
fields.DecimalField(max_digits=10, decimal_places=2, null=True, )
p_price =
fields.DecimalField(max_digits=10, decimal_places=2, null=True, )

Copy link
Contributor

@waketzheng waketzheng left a comment

Choose a reason for hiding this comment

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

Line 33: if self.data_type in ["decimal", "numeric"]:
Can be changed to elif self.data_type in ("decimal", "numeric"):

And line 39: length = ", ".join(length_parts)+", "
Shoud be changed to:

if length_parts:
    length = ", ".join(length_parts) + ", "

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