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

Optimize: n + 1 problem in facility upsert #86

Closed
afzalIbnSH opened this issue Mar 24, 2020 · 2 comments
Closed

Optimize: n + 1 problem in facility upsert #86

afzalIbnSH opened this issue Mar 24, 2020 · 2 comments

Comments

@afzalIbnSH
Copy link
Contributor

Code:

        for ca in capacities:
            facility.facilitycapacity_set.update_or_create(
                room_type=ca['room_type'],
                defaults=ca
            )
@afzalIbnSH
Copy link
Contributor Author

I'll do this.

@afzalIbnSH
Copy link
Contributor Author

@anroopak says

The max it does is against 5 rows. So I don’t think you should be spending time here. 

Closing this.

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

No branches or pull requests

1 participant