'Default Sender name for the alert
Sendername is the name of the organisation if user is associated
else None'

@staticmethod
def cap_sendername():

    db = current.db
    utable = db.auth_user
    otable = current.s3db.org_organisation
    query = (((utable.id == current.auth.user.id) & (utable.organisation_id == otable.id)) & (otable.deleted != True))
    row = db(query).select(otable.name, limitby=(0, 1)).first()
    if row:
        return row.name
    return current.auth.user.username
