Make image field not required
This commit is contained in:
@@ -14,7 +14,7 @@ class MyApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: 'Grocery Helper',
|
||||
title: 'One Trip',
|
||||
theme: lightTheme,
|
||||
darkTheme: darkTheme,
|
||||
themeMode: ThemeMode.system,
|
||||
|
||||
@@ -258,7 +258,8 @@ class _IngredientSectionState extends State<IngredientSection> {
|
||||
),
|
||||
),
|
||||
Divider(
|
||||
height: 1,
|
||||
height: 2,
|
||||
thickness: 1,
|
||||
color: index % 2 == 0
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).colorScheme.error)
|
||||
|
||||
@@ -10,11 +10,6 @@ https://docs.djangoproject.com/en/4.1/howto/deployment/asgi/
|
||||
import os
|
||||
import django
|
||||
|
||||
from django.core.asgi import get_asgi_application
|
||||
from channels.routing import ProtocolTypeRouter, URLRouter
|
||||
from channels.auth import AuthMiddlewareStack
|
||||
import ws.routing
|
||||
|
||||
settings = 'one_trip_api.settings.dev'
|
||||
if os.getenv("DJANGO_RELEASE", False):
|
||||
settings = 'one_trip_api.settings.release'
|
||||
@@ -22,6 +17,11 @@ if os.getenv("DJANGO_RELEASE", False):
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', settings)
|
||||
django.setup()
|
||||
|
||||
from django.core.asgi import get_asgi_application
|
||||
from channels.routing import ProtocolTypeRouter, URLRouter
|
||||
from channels.auth import AuthMiddlewareStack
|
||||
import ws.routing
|
||||
|
||||
print("ASGI Started")
|
||||
django_asgi_app = get_asgi_application()
|
||||
|
||||
|
||||
@@ -21,9 +21,7 @@ class UserSerializer(serializers.ModelSerializer): # https://stackoverflow.com/
|
||||
|
||||
return super().update(instance, validated_data)
|
||||
|
||||
image = serializers.ImageField(
|
||||
max_length=None, use_url=False
|
||||
)
|
||||
image = serializers.ImageField(required=False, max_length=None, use_url=False)
|
||||
|
||||
class Meta:
|
||||
model = User
|
||||
|
||||
Reference in New Issue
Block a user