def add_org_pkg(package): data = { 'organisation_id': organisation.id, 'package_id': package, 'condition': condition } if dqorganisations.addOrganisationPackage(data): flash('Successfully added package to your organisation.', 'success') else: flash("Couldn't add package to your organisation.", 'error')