def addNotificationAndNotify(profile, notificationType, title, content, uri):
    addNotification(profile, notificationType, title, content, uri)
    if 0 > Device.objects.filter(datastore_owner = profile).count():
        gcm = GCM(settings.GCM_API_KEY)

        for device in Device.objects.filter(datastore_owner = profile):
            try:
                gcm.plaintext_request(registration_id=device.gcm_reg_id, data= {"action":"notify"})
            except Exception as e:
                print "Issue with sending notification to: %s, %s" % (profile.id, profile.uuid)
                print e
dataset/ETHPy150Open HumanDynamics/openPDS/openpds/questions/tasks.py/addNotificationAndNotify/swapped operands of `>`