1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] I can not enter the data through DRF API for model Band_qilish even it is empty

Discussão em 'Python' iniciado por Stack, Setembro 12, 2024.

  1. Stack

    Stack Membro Participativo

    I have validation error when attempting to enter the data for the model Band_qilish through DRF API even it is empty. Help me with how to solve this problem. You can try it here: https://github.com/Diamondman51/AVIA.git Just enter some data for models Chipta and Yolovchi after that try entering data through API for the model Band_qilish passing for it existing "ismi" field from model Yolovchi and existing "raqam" field from model Chipta. It must raise exception about existing "raqam" even there is no data in Band_qilish model.

    I tried everything but it worked only when I removed the parameter unique from the model Chipta from field raqam. But the field raqam in this case must be unique.

    Continue reading...

Compartilhe esta Página