Details
-
Type:
Task
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:
-
Story Points:1
-
Epic Link:
-
Sprint:Summer 2019 Sprint 12, Fall 2019 Sprint 1
Description
When we run makemigrations when standing up AppStore, the following warning gets printed:
(venv) AppStore $ python manage.py makemigrations
/var/www/vhosts/appstore/conf/mock.py:6: UserWarning: Running with local config MOCK !
warnings.warn("Running with local config MOCK !")
System check identified some issues:
WARNINGS:
?: (urls.W005) URL namespace 'social' isn't unique. You may not be able to reverse all URLs in this namespace
submit_app.AppPending.dependencies: (fields.W340) null has no effect on ManyToManyField.
For this task, investigate what is happening and propose a fix here.
Attachments
Issue Links
Activity
| Field | Original Value | New Value |
|---|---|---|
| Epic Link | IGBF-1388 [ 17463 ] |
| Status | Open [ 1 ] | In Progress [ 3 ] |
| Status | In Progress [ 3 ] | Needs 1st Level Review [ 10005 ] |
| Status | Needs 1st Level Review [ 10005 ] | In Progress [ 3 ] |
| Assignee | Sameer Shanbhag [ sameer ] |
| Status | In Progress [ 3 ] | Needs 1st Level Review [ 10005 ] |
| Assignee | Sameer Shanbhag [ sameer ] |
| Sprint | Summer 2019 Sprint 12 [ 71 ] | Summer 2019 Sprint 12, Fall 2019 Sprint 1 [ 71, 72 ] |
| Rank | Ranked higher |
| Description |
When we run makemigrations when standing up AppStore, the following warning gets printed:
venv) AppStore $ python manage.py makemigratoins /var/www/vhosts/appstore/conf/mock.py:6: UserWarning: Running with local config MOCK ! warnings.warn("Running with local config MOCK !") Unknown command: 'makemigratoins'. Did you mean makemigrations? Type 'manage.py help' for usage. (venv) AppStore $ python manage.py makemigrations /var/www/vhosts/appstore/conf/mock.py:6: UserWarning: Running with local config MOCK ! warnings.warn("Running with local config MOCK !") System check identified some issues: WARNINGS: ?: (urls.W005) URL namespace 'social' isn't unique. You may not be able to reverse all URLs in this namespace submit_app.AppPending.dependencies: (fields.W340) null has no effect on ManyToManyField. For this task, investigate what is happening and propose a fix here. |
When we run makemigrations when standing up AppStore, the following warning gets printed:
(venv) AppStore $ python manage.py makemigrations /var/www/vhosts/appstore/conf/mock.py:6: UserWarning: Running with local config MOCK ! warnings.warn("Running with local config MOCK !") System check identified some issues: WARNINGS: ?: (urls.W005) URL namespace 'social' isn't unique. You may not be able to reverse all URLs in this namespace submit_app.AppPending.dependencies: (fields.W340) null has no effect on ManyToManyField. For this task, investigate what is happening and propose a fix here. |
| Resolution | Done [ 10000 ] | |
| Status | Needs 1st Level Review [ 10005 ] | Closed [ 6 ] |
| Workflow | Loraine Lab Workflow [ 18675 ] | Fall 2019 Workflow Update [ 20305 ] |
| Workflow | Fall 2019 Workflow Update [ 20305 ] | Revised Fall 2019 Workflow Update [ 22465 ] |
| Assignee | Sameer Shanbhag [ sameer ] |
Error :URL namespace 'social' isn't unique. You may not be able to reverse all URLs in this namespace
File: "users/urls.py"
Line: path(r'', include('social_django.urls', namespace='social'))
Explanation: The namespace='social' is a problem here, Usually this warning occurs when same namespace is used to define different paths. Can be solved by changing the namespace to something else other than social at on of the places where namespace is mentioned.
Error: submit_app.AppPending.dependencies: (fields.W340) null has no effect on ManyToManyField.
File: submit_app/models.py
Line: dependencies = models.ManyToManyField(Release, related_name='+', blank=True, null=True)
Explanation:
As mentioned at : https://stackoverflow.com/questions/18243039/migrating-manytomanyfield-to-null-true-blank-true-isnt-recognized
"null" doesn't mean anything at the database level when used with a ManyToManyField. The declaration of a ManyToManyField causes the creation of an intermediate table to hold the relationship, and although Django will create a standard attribute on your model instance for your convenience, there is no actual column representing it that could be nulled. By definition there can always be zero instances of the relationship.
blank=True/False, though, does have an effect on the admin app, forcing the user to choose at least one relation.
Solution: removing null=true will allow us to get rid of the warning.