exadel-inc / CompreFace

Leading free and open-source face recognition system
https://exadel.com/accelerator-showcase/compreface/
Apache License 2.0
5.71k stars 775 forks source link

Add Validation on empty subject when saving a subject example #617

Closed pospielov closed 3 years ago

pospielov commented 3 years ago

Describe the bug There is a possibility to save a Subject Example with empty subject name

To Reproduce Preconditions:

  1. User has an active account and application
  2. The app has a recognition service

Steps:

  1. Save a Subject Example with an empty subject name using this rest API request: https://github.com/exadel-inc/CompreFace/blob/master/docs/Rest-API-description.md

Actual result: the example is successfully saved with an empty name

Expected behavior Validation should apply. The error should be displayed Error message: "Subject name is empty"

Screenshots image

mslowiak commented 3 years ago

Hi @pospielov! Can I dig into that issue? :)

pospielov commented 3 years ago

Hi, thanks for the interest in our repository, of course, you can, I assigned the issue to you

mslowiak commented 3 years ago

@pospielov Is the postman collection available somewhere? If not, could you export the request that is provided in the ticket?

mslowiak commented 3 years ago

I tested it running the requests from Intellij :) PR is ready for a review

pospielov commented 3 years ago

Hi, sorry for the long response, thanks for the pull request, the code looks correct, but I'll check how it works tomorrow and merge if everything fine