Skip to content

Commit 2208608

Browse files
committed
bug fixes
1 parent 600b73f commit 2208608

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

piccolo/apps/asgi/commands/templates/starlette/main.py.jinja

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ if __name__ == "__main__":
99
from hypercorn.asyncio import serve
1010
from hypercorn.config import Config
1111

12+
from app import app
13+
14+
1215
class CustomConfig(Config):
1316
use_reloader = True
1417

15-
asyncio.run(serve(APP, CustomConfig()))
18+
asyncio.run(serve(app, CustomConfig()))
1619

1720
serve(app)
1821
{% endif %}

piccolo/apps/user/piccolo_migrations/2020-06-11T21:38:55.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async def forwards():
1515
params={
1616
"length": 255,
1717
"default": "",
18-
"null": False,
18+
"null": True,
1919
"primary": False,
2020
"key": False,
2121
"unique": False,
@@ -31,7 +31,7 @@ async def forwards():
3131
params={
3232
"length": 255,
3333
"default": "",
34-
"null": False,
34+
"null": True,
3535
"primary": False,
3636
"key": False,
3737
"unique": False,

piccolo/apps/user/tables.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class BaseUser(Table, tablename="piccolo_user"):
2020

2121
username = Varchar(length=100, unique=True)
2222
password = Secret(length=255)
23-
first_name = Varchar()
24-
last_name = Varchar()
23+
first_name = Varchar(null=True)
24+
last_name = Varchar(null=True)
2525
email = Varchar(length=255, unique=True)
2626
active = Boolean(default=False)
2727
admin = Boolean(default=False)

0 commit comments

Comments
 (0)