We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If in the models you define Numeric type with precision and scale:
class Product(db.Model): __tablename__ = 'product' id = db.Column(db.BigInteger(), primary_key=True) category = db.Column(db.BigInteger(), db.ForeignKey('category.id')) name = db.Column(db.String(), unique=True, nullable=False) slug = db.Column(db.String(), unique=True, nullable=False) description = db.Column(db.Unicode(), nullable=True) price = db.Column(db.Numeric(6, 2), nullable=False) image = db.Column(db.String(), nullable=True) thumbnail = db.Column(db.String(), nullable=True) date_added = db.Column(db.DateTime(), nullable=False)
We will get:
Traceback (most recent call last): File "/home/shako/REPOS/Learning_FastAPI/Djackets/backend/app/admin.py", line 17, in <module> create_admin_app( File "/home/shako/REPOS/Learning_FastAPI/Djackets/.venv/lib/python3.9/site-packages/gino_admin/core.py", line 185, in create_admin_app return init_admin_app(host, port, db, db_models, config) File "/home/shako/REPOS/Learning_FastAPI/Djackets/.venv/lib/python3.9/site-packages/gino_admin/core.py", line 196, in init_admin_app add_admin_panel(app, db, db_models, **config) File "/home/shako/REPOS/Learning_FastAPI/Djackets/.venv/lib/python3.9/site-packages/gino_admin/core.py", line 129, in add_admin_panel extract_models_metadata(db, db_models) File "/home/shako/REPOS/Learning_FastAPI/Djackets/.venv/lib/python3.9/site-packages/gino_admin/core.py", line 97, in extract_models_metadata column_details = extract_column_data(model_id) File "/home/shako/REPOS/Learning_FastAPI/Djackets/.venv/lib/python3.9/site-packages/gino_admin/core.py", line 45, in extract_column_data len_ = int(str(column.type).split("(")[1].split(")")[0]) ValueError: invalid literal for int() with base 10: '6, 2'
The text was updated successfully, but these errors were encountered:
@ShahriyarR, thanks for the report, I will try to fix as soon as possible
Sorry, something went wrong.
No branches or pull requests
If in the models you define Numeric type with precision and scale:
We will get:
The text was updated successfully, but these errors were encountered: