Skip to content

Commit

Permalink
add temp debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Feb 12, 2024
1 parent b8c50c8 commit 38b8418
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions projectroles/remote_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,9 @@ def get_source_data(self, target_site, req_version=None):
from projectroles.views_api import CORE_API_DEFAULT_VERSION

req_version = CORE_API_DEFAULT_VERSION
print('DEBUG: get_source_data req_version={}'.format(req_version))
add_user_name = version.parse(req_version) >= version.parse('0.13.3')
print('DEBUG: add_user_name={}'.format(add_user_name))
sync_data = {
'users': {},
'projects': {},
Expand Down
3 changes: 3 additions & 0 deletions projectroles/views_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1260,9 +1260,12 @@ def get(self, request, *args, **kwargs):
# Pass request version to get_source_data()
accept_header = request.headers.get('Accept')
if accept_header and 'version=' in accept_header:
print('DEBUG: accept_header set')
req_version = accept_header[accept_header.find('version=') + 8 :]
else:
print('DEBUG: accept_header not set')
req_version = CORE_API_DEFAULT_VERSION
print('DEBUG: API view req_version={}'.format(req_version))
sync_data = remote_api.get_source_data(target_site, req_version)
# Update access date for target site remote projects
target_site.projects.all().update(date_access=timezone.now())
Expand Down

0 comments on commit 38b8418

Please sign in to comment.