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

Bug - User_id #30

Open
ezspot opened this issue Oct 5, 2021 · 5 comments
Open

Bug - User_id #30

ezspot opened this issue Oct 5, 2021 · 5 comments

Comments

@ezspot
Copy link
Contributor

ezspot commented Oct 5, 2021

Not sure what's the plan with this field, but it's empty. Just remove? Or

@foad-heidari
Copy link
Owner

where is that field?

can you show the file name and the locations?

@ezspot
Copy link
Contributor Author

ezspot commented Oct 6, 2021

Found it in db.sqlite3
image

@foad-heidari
Copy link
Owner

yes, there is a ForeignKey to the user,

so if the user already have an account, we link the appointment to the user

class Booking(models.Model):
    user = models.ForeignKey(settings.AUTH_USER_MODEL,
                             on_delete=models.CASCADE, blank=True, null=True)
    date = models.DateField()
    ...

@ezspot
Copy link
Contributor Author

ezspot commented Oct 6, 2021

But the user is not defined everywhere else? So what user are we talking about.

@foad-heidari
Copy link
Owner

Django user modal.

we need to assign the appointment to the user in the create booking view

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