not getting fetch data from OneToOneFiled in Django Rest Framework
Changes related and verbose name solve this problem:
class Hiring(BaseModel):
driver = models.OneToOneField(
Driver,
models.CASCADE,
related_name='hiring',
verbose_name='hiring',
null=True, blank=True
)
status = models.CharField(max_length = 255,choices=STATUS_CHOICES, null=True, blank=True)