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

Can't import a recipe with Polish diacritics (ć, ń, ó, ś, ź;) in name #2429

Closed
miczlo opened this issue Apr 21, 2023 · 3 comments
Closed

Comments

@miczlo
Copy link

miczlo commented Apr 21, 2023

Tandoor Version

v1.4.8

Setup

Docker / Docker-Compose

Reverse Proxy

Nginx Proxy Manager (NPM)

Other

No response

Bug description

When trying to import a recipe I get 'There was an error creating a resource'.
Docker logs say bad request and the response is '{"name":["Not a valid string."]}'
If all Polish characters removed it imports fine

Relevant logs

web_recipes_1    | WARNING:django.request:Bad Request: /api/recipe/                                                                                                                                   web_recipes_1    | 172.19.0.4 - - [21/Apr/2023:13:59:46 +0100] "POST /api/recipe/ HTTP/1.0" 400 32 "http://192.168.50.11:28650/data/import/url" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"        

Dev tools:
http request response:
{"name":["Not a valid string."]}
@vabene1111
Copy link
Collaborator

Can you post a few example links so I can take a look?

@miczlo
Copy link
Author

miczlo commented Apr 21, 2023

Sure, see below:
https://domowe-wypieki.pl/przepisy/ciasta/210-babowka-zawijaniec-drozdzowy-z-kakao

@vabene1111
Copy link
Collaborator

fixed, it was actually not because of the characters but because it was an array for some reason. I added a check for names to filter these out, all characters should be kept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants