make icon optional again

This commit is contained in:
Laura Klünder 2023-12-04 23:07:30 +01:00
parent 29e16e8ce0
commit f64e65f297
2 changed files with 4 additions and 4 deletions

View file

@ -1,5 +1,5 @@
import re
from typing import Annotated, Any, Union
from typing import Annotated, Any, Union, Optional
from ninja import Schema
from pydantic import Field as APIField
@ -100,7 +100,7 @@ class LocationSchema(WithAccessRestrictionSchema, TitledSchema, LocationSlugSche
"preferred language based on the Accept-Language header.",
example="near Area 51",
)
icon: NonEmptyStr = APIField(
icon: Optional[NonEmptyStr] = APIField( # todo: not optional?
title="icon name",
description="any material design icon name",
example="pin_drop",