Skip to content

Commit

Permalink
fix: resolve ImportError for 'create_response_field' in fastapi_amis_…
Browse files Browse the repository at this point in the history
…admin/crud/parser.py (#187)
  • Loading branch information
crudalex committed Dec 24, 2024
1 parent 90fea56 commit 3b1f18c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fastapi_amis_admin/crud/parser.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import datetime
from functools import lru_cache
from importlib.metadata import version
from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Type, TypeVar, Union
from uuid import UUID

import sqlalchemy
from fastapi.utils import create_cloned_field, create_response_field
if version("fastapi") > "0.112.2":
from fastapi.utils import create_model_field as create_response_field
else:
from fastapi.utils import create_response_field
from pydantic import BaseConfig, BaseModel
from pydantic.fields import FieldInfo
from sqlalchemy import Column, String, Table
Expand Down

0 comments on commit 3b1f18c

Please sign in to comment.