You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@mprahl I makde some changes to the code for this issue, however I can't figure out an improvement to dependencies_count and packages_count except changing the filter criterion like RequestDependency.request_id == self.id based on a relationship property. Any idea? What is your thought on the potential area for improvement originally?
@mprahl I makde some changes to the code for this issue, however I can't figure out an improvement to dependencies_count and packages_count except changing the filter criterion like RequestDependency.request_id == self.id based on a relationship property. Any idea? What is your thought on the potential area for improvement originally?
@tkdchen I think it'd be cleaner to use a relationship instead of the foreign keys directly in the filter as you mentioned, but it's fine to keep it as is. I'll leave the decision up to you if you'd like to change it.
In models.py, there are a few places where the foreign key is directly used instead of a relationship. We should use a relationship when possible.
For example:
https://github.com/release-engineering/cachito/blob/b3a7c5a256f450cd16f419dbf4e420690ed8f533/cachito/web/models.py#L540-L543
This is another instance:
https://github.com/release-engineering/cachito/blob/b3a7c5a256f450cd16f419dbf4e420690ed8f533/cachito/web/models.py#L574
Investigate if its worth using an alternate join condition here instead of this method:
https://github.com/release-engineering/cachito/blob/b3a7c5a256f450cd16f419dbf4e420690ed8f533/cachito/web/models.py#L387-L391
This might be another potential area for improvement (needs investigation):
https://github.com/release-engineering/cachito/blob/b3a7c5a256f450cd16f419dbf4e420690ed8f533/cachito/web/models.py#L312-L349
This might be also another potential area for improvement (needs investigation):
https://github.com/release-engineering/cachito/blob/b3a7c5a256f450cd16f419dbf4e420690ed8f533/cachito/web/models.py#L351-L377
The text was updated successfully, but these errors were encountered: