| Summary: |
Toaster managed mode: two or more variables having the same name can be added for the same project |
| Product: |
[Build System, Metadata & Runtime] Toaster
|
Reporter: |
Ionut Chisanovici <ionutx.chisanovici> |
| Component: |
toaster | Assignee: |
David Reyna <david.reyna> |
| Status: |
VERIFIED
FIXED
|
QA Contact: |
Alexandru Roman <alexandru.costinx.roman> |
| Severity: |
major
|
|
|
| Priority: |
Medium
|
CC: |
alexandru.costinx.roman, alexandru.damian, belen.barros.pena, bluelightning, bogdanx.a.voiculescu, cristiana.voicu, jessica.zhang
|
| Version: |
1.8 | |
|
| Target Milestone: |
1.8 M3 | |
|
| Hardware: |
x86 | |
|
| OS: |
Multiple | |
|
| Whiteboard: |
|
|
OS type for building Yocto:
|
---
|
Type of Regression:
|
New (Never tested)
|
|
Verified:
|
|
Documentation change:
|
No (bug/feature does not impact docs)
|
| Attachments: |
|
Created attachment 2387 [details] crashed_toaster_project_page Hi, For 1.8 M2 RC2, commit: 22c38e2d8a058619e3d05534b5e830b750aa4241, for a particular project, the configuration page ("Edit configuration variables") allow users to add two or more variables having the same name as the one that is already added. This is causing toaster project configuration page to crash. select name, value from orm_projectvariable; name = IMAGE_INSTALL_append value = name = PACKAGE_CLASSES value = package_rpm name = MACHINE value = genericx86-64 name = SDKMACHINE value = x86_64 name = DISTRO value = poky name = IMAGE_FSTYPES value = ext3 jffs2 tar.bz2 name = MACHINE value = qemux86 Below the traceback from toaster_web.log: Internal Server Error: /toastergui/project/1/ Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/home/ionut/work/poky_1.8/poky/bitbake/lib/toaster/toastergui/views.py", line 2056, in project context["machine"] = {"name": prj.projectvariable_set.get(name="MACHINE").value} File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line 143, in get return self.get_query_set().get(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 405, in get (self.model._meta.object_name, num, kwargs)) MultipleObjectsReturned: get() returned more than one ProjectVariable -- it returned 2! Lookup parameters were {'name': 'MACHINE'} [04/Feb/2015 15:39:48] "GET /toastergui/project/1/ HTTP/1.1" 500 86331 Attached the screen shot with the crashed page. Cheers, Ionut C