Shepherd
Shepherd copied to clipboard
Error if client name does not exist
The client field in the Checkout form is a free text area.
https://github.com/GhostManager/Shepherd/blob/dfba838ec4f5713110d8b1afd8b060734dfea9d0/catalog/forms.py#L19
Is there a reason it is not a ModelChoiceField like the Project Type to select from the client list ?
Because right now, there is an error if the client name does not exist.
Internal Server Error: /catalog/checkout/15
Traceback (most recent call last):
...
File "/opt/Shepherd/catalog/views.py", line 123, in checkout
client = Client.objects.get(name__iexact=client_name)
...
catalog.models.Client.DoesNotExist: Client matching query does not exist.