core: fix error when setting icon/background to url longer than 100 chars

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-07-09 19:31:32 +02:00
parent 7ddb459030
commit 92ba77e9e5
5 changed files with 52 additions and 1 deletions

View File

@ -61,5 +61,8 @@ gen-outpost:
gen: gen-build gen-clean gen-web gen-outpost gen: gen-build gen-clean gen-web gen-outpost
migrate:
python -m lifecycle.migrate
run: run:
go run -v cmd/server/main.go go run -v cmd/server/main.go

View File

@ -0,0 +1,20 @@
# Generated by Django 3.2.5 on 2021-07-09 17:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("authentik_core", "0025_alter_application_meta_icon"),
]
operations = [
migrations.AlterField(
model_name="application",
name="meta_icon",
field=models.FileField(
default=None, max_length=500, null=True, upload_to="application-icons/"
),
),
]

View File

@ -228,7 +228,10 @@ class Application(PolicyBindingModel):
) )
# For template applications, this can be set to /static/authentik/applications/* # For template applications, this can be set to /static/authentik/applications/*
meta_icon = models.FileField( meta_icon = models.FileField(
upload_to="application-icons/", default=None, null=True upload_to="application-icons/",
default=None,
null=True,
max_length=500,
) )
meta_description = models.TextField(default="", blank=True) meta_description = models.TextField(default="", blank=True)
meta_publisher = models.TextField(default="", blank=True) meta_publisher = models.TextField(default="", blank=True)

View File

@ -0,0 +1,24 @@
# Generated by Django 3.2.5 on 2021-07-09 17:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("authentik_flows", "0022_alter_flowstagebinding_invalid_response_action"),
]
operations = [
migrations.AlterField(
model_name="flow",
name="background",
field=models.FileField(
default=None,
help_text="Background shown during execution",
max_length=500,
null=True,
upload_to="flow-backgrounds/",
),
),
]

View File

@ -121,6 +121,7 @@ class Flow(SerializerModel, PolicyBindingModel):
default=None, default=None,
null=True, null=True,
help_text=_("Background shown during execution"), help_text=_("Background shown during execution"),
max_length=500,
) )
compatibility_mode = models.BooleanField( compatibility_mode = models.BooleanField(