How to use the gridcal.models.Membership.objects function in GridCal

To help you get started, we’ve selected a few GridCal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wikical / grical / gridcal / View on Github external
def is_user_in_group(user_id, group_id):
    if len(Membership.objects.filter(user__id__exact=user_id, group__id__exact=group_id)) == 1:
        return True
        return False