Commit 87d76fa 1 parent f713cdb commit 87d76fa Copy full SHA for 87d76fa
File tree 1 file changed +3
-23
lines changed
src/openforms/submissions/migrations
1 file changed +3
-23
lines changed Original file line number Diff line number Diff line change 1
1
# Generated by Django 3.2.21 on 2023-11-17 10:40
2
2
3
3
from django .db import migrations
4
- from django .db .migrations .state import StateApps
5
- from django .db .backends .base .schema import BaseDatabaseSchemaEditor
6
-
7
- from furl import furl
8
-
9
-
10
- def cleanup_submission_urls (
11
- apps : StateApps , schema_editor : BaseDatabaseSchemaEditor
12
- ) -> None :
13
-
14
- Submission = apps .get_model ("submissions" , "Submission" )
15
-
16
- for submission in Submission .objects .iterator ():
17
- f = furl (submission .form_url )
18
- f .remove (fragment = True )
19
- if f .path .segments [- 1 :] == ["startpagina" ]:
20
- f .path .segments .remove ("startpagina" )
21
- submission .form_url = f .url
22
-
23
- submission .save ()
24
4
25
5
26
6
class Migration (migrations .Migration ):
@@ -29,6 +9,6 @@ class Migration(migrations.Migration):
29
9
("submissions" , "0002_change_json_encoder" ),
30
10
]
31
11
32
- operations = [
33
- migrations . RunPython ( cleanup_submission_urls , migrations . RunPython . noop )
34
- ]
12
+ # RunPython operation removed as part of 2.7 release cycle, which requires 2.6.7 to
13
+ # be run first.
14
+ operations = [ ]
You can’t perform that action at this time.
0 commit comments