Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

fixing multiple issues in the backend #21

Merged
merged 1 commit into from
Jan 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import List

from fastapi import APIRouter, Body, Depends, HTTPException
from pydantic.types import EmailStr
from pydantic.networks import EmailStr

from app import crud
from app.api.utils.security import get_current_active_superuser, get_current_active_user
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from fastapi import APIRouter, Depends
from pydantic.types import EmailStr
from pydantic.networks import EmailStr

from app.api.utils.security import get_current_active_superuser
from app.core.celery_app import celery_app
Expand Down
4 changes: 2 additions & 2 deletions {{cookiecutter.project_slug}}/backend/app/app/crud/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from couchbase.n1ql import CONSISTENCY_REQUEST, N1QLQuery
from fastapi.encoders import jsonable_encoder
from pydantic import BaseModel
from pydantic.fields import Field, Shape
from pydantic.fields import Field, SHAPE_LIST, SHAPE_SET, SHAPE_TUPLE

from app.core import config

Expand Down Expand Up @@ -85,7 +85,7 @@ def search_results_to_model(
field: Field = doc_model.__fields__[key]
if not value:
value = None
elif field.shape in {Shape.LIST, Shape.SET, Shape.TUPLE} and not isinstance(
elif field.shape in {SHAPE_LIST, SHAPE_SET, SHAPE_TUPLE} and not isinstance(
value, list
):
value = [value]
Expand Down