Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Flags from Opensrp 1 #335

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Import Flags from Opensrp 1 #335

wants to merge 1 commit into from

Conversation

Wambere
Copy link
Contributor

@Wambere Wambere commented Feb 4, 2025

IMPORTANT: Where possible all PRs must be linked to a Github issue

Fixes #322

Engineer Checklist

  • I have run ./gradlew spotlessApply to check my code follows the project's style guide
  • I have built using the command ./gradlew clean assemble and run the efsity jar to verify my change fixes the issue and does not break the application

@@ -99,7 +99,7 @@ def request(self, **kwargs):
# TODO - spread headers into kwargs.
headers = {"content-type": "application/json", "accept": "application/json"}
response = self.api_service.oauth.request(headers=headers, **kwargs)
if response.status_code == 401 or '<html class="login-pf">' in response.text:
if response.status_code == 401 or 'login' in response.text:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial line only worked for a html response, this should work even for a json response

@Wambere
Copy link
Contributor Author

Wambere commented Feb 4, 2025

Will be adding tests in a bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Importer] Add the ability to import flags from a CSV file generated from OpenSRP 1 data.
1 participant