equal
deleted
inserted
replaced
1623 raise TypeError, _("%s body don't have instances!")%self.content.getLocalTag() |
1623 raise TypeError, _("%s body don't have instances!")%self.content.getLocalTag() |
1624 setattr(cls, "getcontentInstanceByName", getcontentInstanceByName) |
1624 setattr(cls, "getcontentInstanceByName", getcontentInstanceByName) |
1625 |
1625 |
1626 def removecontentInstance(self, local_id): |
1626 def removecontentInstance(self, local_id): |
1627 if self.content.getLocalTag() in ["LD","FBD","SFC"]: |
1627 if self.content.getLocalTag() in ["LD","FBD","SFC"]: |
1628 instance = instance_by_id_xpath(self.content) |
1628 instance = instance_by_id_xpath(self.content, localId=local_id) |
1629 if len(instance) > 0: |
1629 if len(instance) > 0: |
1630 self.content.remove(instance[0]) |
1630 self.content.remove(instance[0]) |
1631 else: |
1631 else: |
1632 raise ValueError, _("Instance with id %d doesn't exist!")%id |
1632 raise ValueError, _("Instance with id %d doesn't exist!")%id |
1633 else: |
1633 else: |