Draft
Conversation
This commit simplifies and optimizes the querying logic in campaign.py. The main changes involve minimizing the number of separate queries within loops and instead using single queries with the "__in" lookup. This is more performant and reduces database load. The code is also slightly more readable with this structure.
…ultiple-tech-to-events
Updated the .gitignore file to ignore JetBrains IDE files .idea/. In the store/campaign.py, refactored add_campaign_technology_event method to handle multiple campaign technologies instead of a single one. Modified error messages and variable names to reflect changes.
This commit involves refactoring of the implementation of add_campaign_technology_event method in the campaign.py file. The multiple campaign ids handling has been removed and replaced with handling for a single campaign id. This promises for a more direct, and less error-prone system.
The commit introduces iterative processing for assigning multiple technologies to a campaign. Instead of dealing with a single technology at a time, the updated method accepts and processes a list of technologies, allowing numerous assignments in one operation, and subsequently returns a list of successful assignments. This offers a more efficient way to handle campaign technologies.
…ultiple-tech-to-events
Updated the validation rules in the "campaign" API handler to require "campaign_technology_ids" and "event_ids". Removed a redundant comment in the "campaign" data store file. The changes aim to improve data integrity and code readability.
The payload in the test "test_add_campaign_technology_event" in "test_campaigns.py" has been updated. The "campaign_technology_id" attribute has been renamed to "campaign_technology_ids" and now accepts a list of ids instead of a single id.
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1040 +/- ##
=======================================
Coverage 53.02% 53.02%
=======================================
Files 419 419
Lines 31087 31089 +2
=======================================
+ Hits 16483 16485 +2
Misses 14604 14604 ☔ View full report in Codecov by Sentry. |
Contributor
|
@abdullai-t any update on this draft PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / Highlights
This pull request introduces a feature that allows campaign events to be associated with multiple technologies.
Details (Give details about what this PR accomplishes, include any screenshots etc)
Testing Steps (Provide details on how your changes can be tested)
Requirements (place an
xin each[ ])Transparency (Project board)