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

fix: #2841 - from "AddNewProductPage", no need to be logged in to add data #2844

Merged
merged 3 commits into from
Aug 26, 2022

Conversation

monsieurtanuki
Copy link
Contributor

Impacted files:

  • add_basic_details_page.dart: added parameter bool isLoggedInMandatory
  • add_new_product_page.dart: explicitly calls both pages AddBasicDetailsPage and NutritionPageLoaded with isLoggedInMandatory: false
  • nutrition_page_loaded.dart: added parameter bool isLoggedInMandatory

What

  • The general saveAndRefresh method has a bool isLoggedInMandatory parameter.
  • Its default value is true, and actually we always used the default value: each time we used this method we checked first if the user was logged in. Which was not the desired behavior when creating a new product.
  • Now we explicitly set this parameter to false in (only) 2 cases: inside AddNewProductPage, for AddBasicDetailsPage and NutritionPageLoaded

Fixes bug(s)

…ged in to add data

Impacted files:
* `add_basic_details_page.dart`: added parameter `bool isLoggedInMandatory`
* `add_new_product_page.dart`: explicitly calls both pages `AddBasicDetailsPage` and `NutritionPageLoaded` with `isLoggedInMandatory: false`
* `nutrition_page_loaded.dart`: added parameter `bool isLoggedInMandatory`
@teolemon
Copy link
Member

teolemon commented Aug 26, 2022

@teolemon teolemon added the Product addition The easier it is to add a product and get Nutri-Score, Eco-Score, the happier the users. label Aug 26, 2022
@monsieurtanuki
Copy link
Contributor Author

@teolemon Thank you for your review!
For some reason, I cannot merge.

@teolemon
Copy link
Member

Analyze and test

@teolemon
Copy link
Member

I believe the culprit is
image

cc @M123-dev

@teolemon
Copy link
Member

@monsieurtanuki I believe this is related to working on a fork, it would work on a push to a branch, I believe

@monsieurtanuki
Copy link
Contributor Author

@teolemon Maybe you're right, but I pushed this code the same way as my other PRs.
In one word: help!

@M123-dev
Copy link
Member

M123-dev commented Aug 26, 2022

Yes it is indeed a problem with the workflow calls, should be fixed by #2847

Edit: @teolemon just commited a hotfix to this PR

@monsieurtanuki monsieurtanuki merged commit 474b3d8 into openfoodfacts:develop Aug 26, 2022
@monsieurtanuki
Copy link
Contributor Author

Thank you guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product addition The easier it is to add a product and get Nutri-Score, Eco-Score, the happier the users.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nutrition edit and Basic details are requesting login from new product addition
3 participants