Skip to content

Commit

Permalink
[remove][xs]: removed editor as it is not retriving correct editor
Browse files Browse the repository at this point in the history
  • Loading branch information
sagargg committed Aug 6, 2024
1 parent 8b5ee66 commit 1f4fd39
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions ckanext/aircan_connector/logic/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,6 @@
' See <a href="https://github.com/datopian/ckanext-aircan#airflow-instance-on-google-composer"> Airflow instance on Google Composer </a>' \
' section in AirCan docs for more.'

def _get_editor_user_email(context, pacakge_id):
try:
package_activities = get_action('package_activity_list')(
context, {'id': pacakge_id,
'limit': 1, 'include_hidden_activity': True})
user_id = package_activities[0].get('user_id')
user_dict = get_action('user_show')(context, {'id': user_id})
return user_dict.get('email', False)
except:
return False


def aircan_submit(context, data_dict):
log.info("Submitting resource via Aircan")
check_access('aircan_submit', context, data_dict)
Expand Down Expand Up @@ -130,8 +118,7 @@ def aircan_submit(context, data_dict):
"schema": schema,
"package_id": ckan_resource.get('package_id'),
"datastore_append_or_update": ckan_resource.get('datastore_append_or_update', False),
"datastore_unique_keys": datastore_unique_keys,
"editor_user_email" : _get_editor_user_email(context, pacakge_name)
"datastore_unique_keys": datastore_unique_keys
},
"ckan_config": {
"api_key": ckan_api_key,
Expand Down

0 comments on commit 1f4fd39

Please sign in to comment.