(self, label, user=None)
Add a label to an object.

        Each entry can have multible labels.

        Args:
            label: Name of the label.
            user: Optional user that adds the label (sketch.User).
Add a label to an object.
Add a label to an object .
def add_label(self, label, user=None):
        """Add a label to an object.

        Each entry can have multible labels.

        Args:
            label: Name of the label.
            user: Optional user that adds the label (sketch.User).
        """
        if self.has_label(label):
            return
        self.labels.append(self.Label(user=user, label=label))
        db_session.commit()
def add_label ( self , label , user = None ) : if self . has_label ( label ) : return self . labels . append ( self . Label ( user = user , label = label ) ) db_session . commit ( )