equal
deleted
inserted
replaced
1882 raise TypeError, _("%s body don't have instances!")%self.content["name"] |
1882 raise TypeError, _("%s body don't have instances!")%self.content["name"] |
1883 setattr(cls, "getcontentInstanceByName", getcontentInstanceByName) |
1883 setattr(cls, "getcontentInstanceByName", getcontentInstanceByName) |
1884 |
1884 |
1885 def removecontentInstance(self, id): |
1885 def removecontentInstance(self, id): |
1886 if self.content["name"] in ["LD","FBD","SFC"]: |
1886 if self.content["name"] in ["LD","FBD","SFC"]: |
1887 element = self.instances_dict.get(id, None) |
1887 element = self.instances_dict.pop(id, None) |
1888 if element is not None: |
1888 if element is not None: |
1889 self.content["value"].getcontent().remove(element) |
1889 self.content["value"].getcontent().remove(element) |
1890 else: |
1890 else: |
1891 raise ValueError, _("Instance with id %d doesn't exist!")%id |
1891 raise ValueError, _("Instance with id %d doesn't exist!")%id |
1892 else: |
1892 else: |