Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lti-xblock-consumer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenJupyter
lti-xblock-consumer
Commits
7f3b1503
Commit
7f3b1503
authored
4 years ago
by
stvn
Browse files
Options
Downloads
Plain Diff
Merge PR #136 open-craft/kshitij/fix-migrations
* Commits: Fix migration `config_id` conflict.
parents
1557549e
59b7c431
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.rst
+5
-0
5 additions, 0 deletions
README.rst
lti_consumer/migrations/0006_add_on_model_config_for_lti_1p1.py
+13
-0
13 additions, 0 deletions
...nsumer/migrations/0006_add_on_model_config_for_lti_1p1.py
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
19 additions
and
1 deletion
README.rst
+
5
−
0
View file @
7f3b1503
...
@@ -298,6 +298,11 @@ Please do not report security issues in public. Send security concerns via email
...
@@ -298,6 +298,11 @@ Please do not report security issues in public. Send security concerns via email
Changelog
Changelog
=========
=========
2.5.2 - 2021-01-20
------------------
* Fix issue with migration that causes migration failure due to duplicate `config_id` values.
2.5.1 - 2021-01-19
2.5.1 - 2021-01-19
------------------
------------------
...
...
This diff is collapsed.
Click to expand it.
lti_consumer/migrations/0006_add_on_model_config_for_lti_1p1.py
+
13
−
0
View file @
7f3b1503
...
@@ -6,6 +6,13 @@ import jsonfield.fields
...
@@ -6,6 +6,13 @@ import jsonfield.fields
import
uuid
import
uuid
def
create_config_ids
(
apps
,
schema_editor
):
LtiConfiguration
=
apps
.
get_model
(
'
lti_consumer
'
,
'
LtiConfiguration
'
)
for
config
in
LtiConfiguration
.
objects
.
all
():
config
.
config_id
=
uuid
.
uuid4
()
config
.
save
()
class
Migration
(
migrations
.
Migration
):
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
dependencies
=
[
...
@@ -14,6 +21,12 @@ class Migration(migrations.Migration):
...
@@ -14,6 +21,12 @@ class Migration(migrations.Migration):
operations
=
[
operations
=
[
migrations
.
AddField
(
migrations
.
AddField
(
model_name
=
'
lticonfiguration
'
,
name
=
'
config_id
'
,
field
=
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
null
=
True
),
),
migrations
.
RunPython
(
create_config_ids
),
migrations
.
AlterField
(
model_name
=
'
lticonfiguration
'
,
model_name
=
'
lticonfiguration
'
,
name
=
'
config_id
'
,
name
=
'
config_id
'
,
field
=
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
editable
=
False
,
unique
=
True
),
field
=
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
editable
=
False
,
unique
=
True
),
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
7f3b1503
...
@@ -49,7 +49,7 @@ with open('README.rst') as _f:
...
@@ -49,7 +49,7 @@ with open('README.rst') as _f:
setup
(
setup
(
name
=
'
lti-consumer-xblock
'
,
name
=
'
lti-consumer-xblock
'
,
version
=
'
2.5.
1
'
,
version
=
'
2.5.
2
'
,
description
=
'
This XBlock implements the consumer side of the LTI specification.
'
,
description
=
'
This XBlock implements the consumer side of the LTI specification.
'
,
long_description
=
long_description
,
long_description
=
long_description
,
long_description_content_type
=
'
text/x-rst
'
,
long_description_content_type
=
'
text/x-rst
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment