axa-group / nlp.js-app

MIT License
132 stars 59 forks source link

Whoops. Can't update intents anymore without getting an error #66

Closed qwertyuu closed 4 years ago

qwertyuu commented 4 years ago

Describe the bug You can't update an intent without changing its name, else you get an error.

To Reproduce Steps to reproduce the behavior:

  1. Go to any intent that already exists
  2. Add an utterance or remove one, do any update (other than changing the intent name)
  3. Click "Update"
  4. You get 400 Bad Request with the body of the response being "Intent name already used"

Expected behavior If you don't change the name of the intent, please make sure you check OTHER intents to have the same name (don't take the one being updated into account)

Just saying this makes master absolutely broken. The only bypass I found is to rename the intent twice (once for the update, once for bringing it back where it was before).

maximebeaudoin commented 4 years ago

PR #67 Is open to fix this.

ericzon commented 4 years ago

Fixed & improved, to allow cases where intent names, domain names or entity names exist with the same name in different agents.

ericzon commented 4 years ago

As this is already fixed, I close this issue.