Skip to content

Commit

Permalink
Set description optional in the report
Browse files Browse the repository at this point in the history
  • Loading branch information
melizeche committed Dec 3, 2020
1 parent 57cf4ff commit b9c6cdc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""set description optional in the model
Revision ID: d56d1895bf42
Revises: d38d4e717fa5
Create Date: 2020-12-03 20:20:51.748969
"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'd56d1895bf42'
down_revision = 'd38d4e717fa5'
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
2 changes: 1 addition & 1 deletion app/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class Report(BaseModel):
title="Source",
description="Name used to identify the device",
)
description: str = Field(
description: Optional[str] = Field(
...,
title="Description",
description="User friendly name to identify the device",
Expand Down
1 change: 0 additions & 1 deletion tests/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
{
"source": "aqi",
"sensor": "aqi",
"description": "My AQI"
"longitude": -57.521369,
"latitude": -25.194156,
"quality": {"category": "Moderate", "index": 81},
Expand Down

0 comments on commit b9c6cdc

Please sign in to comment.