Beispiel #1
0
def update_organisation(organisation_id, data):
    """
    Update organisation entry with data given in parameter.
    """
    organisation = Organisation.get(organisation_id)
    organisation.update(data)
    events.emit("organisation:update", {"organisation_id": organisation_id})
    return organisation.present()
Beispiel #2
0
def get_organisation():
    """
    Return organisation set up on this instance. It creates it if none exists.
    """
    organisation = Organisation.query.first()
    if organisation is None:
        organisation = Organisation.create(name="Kitsu")
    return organisation.present()
Beispiel #3
0
 def generate_fixture_organisation(self):
     self.organisation = Organisation.create(name="My Studio",
                                             hours_by_day=8,
                                             use_original_file_name=False)