On 07/04/2015 16:35, "Barros Pena, Belen" <[email protected]>
wrote:


>
>There is a section about layer sources in the Toaster manual:

Pressed 'send' too soon :/

http://www.yoctoproject.org/docs/1.8/toaster-manual/toaster-manual.html#lay
er-source

>
>
>>
>>I am very confused.
>>
>>3) I also tried the "Import Layer" user interface, and I find that the
>>"Import and Add to project" button does not do anything, even with all
>>the fields filled in. I am probably missing a patch.

I just tested this on master and it works for me.

Cheers

Belén

>>
>>- David
>>
>>> -----Original Message-----
>>> From: Barros Pena, Belen [mailto:[email protected]]
>>> Sent: Tuesday, March 31, 2015 9:31 AM
>>> To: Reyna, David; DAMIAN, ALEXANDRU
>>> Cc: [email protected]
>>> Subject: Re: [Toaster] [review-request] dreyna/add_layersource_7437
>>>
>>>
>>>
>>> On 31/03/2015 10:06, "Reyna, David" <[email protected]> wrote:
>>>
>>> >Hi Belén and Alex,
>>> >
>>> >I have a working solution for 7437, in that clicking the add new layer
>>> >sources no longer crashes.
>>> >
>>> >    dreyna/add_layersource_7437
>>> >
>>> >It appears to me that given the backtrace, the Django admin is
>>>attempting
>>> >to touch the new layer source object before the Toaster code can
>>> >initialize it. This patch simple initializes the empty members to a
>>>sane
>>> >(but empty) object values, allowing the bootstrap to finish. When the
>>> >"Add layer source" page does appear to the user, all of the fields are
>>> >indeed empty as you would expect.
>>> >
>>> >You may not like this particular solution, but it works, and may
>>>indicate
>>> >an obvious alternative fix if you see one.
>>>
>>> Can't comment on the patch itself, but the page no longer crashes and I
>>> can create a layer source. However, something strange is happening with
>>> the Sourcetype field. Whatever value I select there, it reverts to
>>>'local'.
>>>
>>> Let me know if you need me to open a new issue for this.
>>>
>>> Cheers
>>>
>>> Belén
>>>
>>> >
>>> >diff --git a/bitbake/lib/toaster/orm/models.py
>>> >b/bitbake/lib/toaster/orm/models.py
>>> >index 625eb1e..abe9c3a 100644
>>> >--- a/bitbake/lib/toaster/orm/models.py
>>> >+++ b/bitbake/lib/toaster/orm/models.py
>>> >@@ -651,6 +651,14 @@ class LayerSource(models.Model):
>>> >         return super(LayerSource, self).save(*args, **kwargs)
>>> >
>>> >     def get_object(self):
>>> >+        # preset an un-initilized object
>>> >+        if None == self.name:
>>> >+            self.name=""
>>> >+        if None == self.apiurl:
>>> >+            self.apiurl=""
>>> >+        if None == self.sourcetype:
>>> >+            self.sourcetype=LayerSource.TYPE_LOCAL
>>> >+
>>> >         if self.sourcetype == LayerSource.TYPE_LOCAL:
>>> >             self.__class__ = LocalLayerSource
>>> >         elif self.sourcetype == LayerSource.TYPE_LAYERINDEX:
>>> >
>>> >- David
>>> >
>>> >> -----Original Message-----
>>> >> From: [email protected] [mailto:toaster-
>>> >> [email protected]] On Behalf Of Reyna, David
>>> >> Sent: Monday, March 30, 2015 6:37 PM
>>> >> To: BARROS PENA, BELEN; WOOD, MICHAEL; DAMIAN, ALEXANDRU
>>> >> Cc: [email protected]
>>> >> Subject: [Toaster] [review-request] dreyna/projects_pagecount_7483
>>> >>
>>> >> Hi Belén and Michael,
>>> >>
>>> >> I went ahead and grabbed (and solved) 7483 "Searching in the all
>>> >>projects
>>> >> table resets the 'show rows' menu to '10'" since it was still in the
>>>new
>>> >> state.
>>> >>
>>> >>     dreyna/projects_pagecount_7483
>>> >>
>>> >> The "count" value for the all projects page was not fully saved in
>>>the
>>> >> cookies because the view class did not end with a
>>> >> '_save_parameters_cookies'.
>>> >>
>>> >> The intermediate cookie "_count" was there (from
>>>basetable_bottom.html)
>>> >> which is why it kind of worked, but that is not used when a search
>>>is
>>> >> issued.
>>> >>
>>> >> - David
>>> >>
>>> >> --
>>> >> _______________________________________________
>>> >> toaster mailing list
>>> >> [email protected]
>>> >> https://lists.yoctoproject.org/listinfo/toaster
>>>
>>
>

-- 
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Reply via email to