-
Notifications
You must be signed in to change notification settings - Fork 7
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
Locations many categories #178
Conversation
@@ -212,9 +212,7 @@ public function getShowRadius() | |||
*/ | |||
public function getCategories() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this method still needed if it's no longer altering the relation list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alteration has been added back in. A typo in a relation array caused the initial problem.
tasks/LocationCategoriesTask.php
Outdated
|
||
$ct = 0; | ||
|
||
$convert = function (DataObject $location) use (&$ct) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add some checks for instances where a location might not have a category. Could skip the add code then. Also work in some memoization to reduce the number of calls to the db for the categories.
Attempted to batch add categories to locations Fixed typo in `belongs_many_many` Updated php docs
Codecov Report
@@ Coverage Diff @@
## master #178 +/- ##
============================================
+ Coverage 72.9% 73.54% +0.63%
- Complexity 83 93 +10
============================================
Files 7 7
Lines 299 310 +11
============================================
+ Hits 218 228 +10
- Misses 81 82 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I might play around with the task a bit to see if there's any additional optimizations we could make, but I think this is in a good spot to merge.
Resolves #176