Skip to content

Commit

Permalink
Merge pull request #987 from bcgov/BUG-contact-validation-failing
Browse files Browse the repository at this point in the history
Bug contact validation failing
  • Loading branch information
adodge-bcg authored Jan 9, 2025
2 parents a4dd31b + d7995df commit 91a425e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ckanext/bcgov/logic/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ def organization_or_group_list_related(context, data_dict):
g1.approval_status = 'approved';
""")

model.Session.remove()
# model.Session.remove()

# groups and oganizations are listed as groups in database
all_groups = {}
Expand Down
13 changes: 7 additions & 6 deletions ckanext/bcgov/util/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,12 +366,13 @@ def get_edc_org(org_id):

def get_orgs_form(field = None):
"""Designed to get available orgs for scheming fields as parameters cannot be defined in choices_helper functions"""
orgs = []
for org in ckan.lib.helpers.organizations_available('create_dataset'):
orgs.append({
'value': org['id'],
'label': org['display_name']
})
context = {'model': model, 'user': c.user, 'auth_user_obj': c.userobj}
data_dict = {
'is_organization': 'True',
'all_fields': 'True'
}
all_orgs_data = get_action('organization_or_group_list_related')(context, data_dict)
orgs = [{'value': org['id'], 'label': org['display_name']} for org in all_orgs_data]
return orgs


Expand Down

0 comments on commit 91a425e

Please sign in to comment.