[PATCH] BZ 788397 block backbone from trying to match images/:id if trying to render edit_xml, overview, or import

Tzu-Mainn Chen tzumainn at redhat.com
Thu Feb 16 20:56:21 UTC 2012


Oh, good point - adding 'new' and pushing.

Mainn

----- Original Message -----
From: "Matt Wagner" <matt.wagner at redhat.com>
To: "Tzu-Mainn Chen" <tzumainn at redhat.com>
Cc: aeolus-devel at lists.fedorahosted.org
Sent: Thursday, February 16, 2012 3:45:49 PM
Subject: Re: [PATCH] BZ 788397 block backbone from trying to match images/:id if trying to render edit_xml, overview, or import

On Thu, Feb 16, 2012 at 02:57:48PM -0500, Tzu-Mainn Chen wrote:
> ---
>  src/public/javascripts/backbone/routers.js |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/src/public/javascripts/backbone/routers.js b/src/public/javascripts/backbone/routers.js
> index cc87445..df10600 100644
> --- a/src/public/javascripts/backbone/routers.js
> +++ b/src/public/javascripts/backbone/routers.js
> @@ -100,6 +100,7 @@ Conductor.Routers.Images = Backbone.Router.extend({
>  
>    show: function(id) {
>      id = Conductor.uuidFromURLFragment(id);
> +    if ( id == "edit_xml" || id == "overview" || id == "import" ) return;
>  
>      setInterval(function() {
>        var image = new Conductor.Models.Image({ id: id });
> -- 
> 1.7.6.5

ACK, this fixes a really irritating bug.

Note that you could (should?) add id == "new" to that list; the
unintentional Backbone calls are taking place on that page too. However,
it's not causing any errors there -- it's just unnecessary.

-- Matt



More information about the aeolus-devel mailing list