def get_or_create_generic(self, content_object=None, **kwargs):
        """Gets or creates a generic object.  This is a wrapper for
        get_or_create(...) when you need to get or create a generic object.

        :param obj: the object to get or create
        :param kwargs: any other kwargs that the model accepts.
        """
        if content_object:
            kwargs['content_type'] = ContentType.objects.get_for_model(
                content_object
            )
            kwargs['object_id'] = content_object.id

        return self.get_or_create(**kwargs)