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

Product Store setting gets duplicated #349

Open
1 of 2 tasks
ymaheshwari1 opened this issue Nov 7, 2024 · 0 comments
Open
1 of 2 tasks

Product Store setting gets duplicated #349

ymaheshwari1 opened this issue Nov 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ymaheshwari1
Copy link
Contributor

Current behavior

In some case, the product store setting gets duplicated resulting in wrong behaviour, as when multiple setting exists we do not check which setting is latest created.

Expected behavior

The settings should work consistently.

Steps to reproduce the issue

  • For any product store setting, create duplicate records
  • Update the same setting from the app, and then check the behaviour on page refresh or logout.

Can you handle fixing this bug by yourself?

  • YES
  • NO

Environment details

  • Browser:
  • OS:
  • Code Version:

Additional information

The exact reason for this issue is still not identified, but below are the two solutions that will help in improving the experience and will help in reducing the possibility of this error again.

Solutions:

  • When fetching the product store setting we check whether the resp has error or not, and if we get any error in the response we consider that its due to missing setting and create a new product store setting, but we should only create a new setting when we have No record found error and not in any other error case.
  • Also when fetching store settings sort the records based on fromDate and store the value of most oldest(first record) setting created, this will help in honoring a single value of setting in all the case even when having multiple records for the same setting.
@ymaheshwari1 ymaheshwari1 added the bug Something isn't working label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant