Removing a relation sometimes fails

Bug #1103204 reported by Brad Crittenden
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-gui
Fix Released
High
Francesco Banconi

Bug Description

When removing a relation sometimes an exception is raised:

Uncaught TypeError: Cannot call method 'one' of null

It is raised by the setting of relationElement below:

 removeRelation: function(d, context, view, confirmButton) {
      var env = this.get('component').get('env');
      var endpoints = d.endpoints;
      var relationElement = Y.one(context.parentNode).one('.relation');
      utils.addSVGClass(relationElement, 'to-remove pending-relation');
      env.remove_relation(
          endpoints[0][0] + ':' + endpoints[0][1].name,
          endpoints[1][0] + ':' + endpoints[1][1].name,
          Y.bind(this._removeRelationCallback, this, view,
          relationElement, d.relation_id, confirmButton));
    },

To reproduce, go to uistage and attempt to remove the relation between mediawiki and memcached.

Note that repeated tries all result in the same failure. However, after successfully removing another relation, the affected one can sometimes be removed.

Related branches

Brad Crittenden (bac)
Changed in juju-gui:
status: New → Triaged
importance: Undecided → High
Brad Crittenden (bac)
Changed in juju-gui:
assignee: nobody → Francesco Banconi (frankban)
status: Triaged → In Progress
Changed in juju-gui:
milestone: none → 0.1.5
Changed in juju-gui:
status: In Progress → Fix Committed
Gary Poster (gary)
Changed in juju-gui:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.