DEV Community

Discussion on: One-To-Many Database Relationships Complete How To

Collapse
 
ekck profile image
Emmanuel Kiprono

hey , am getting this error TypeError: init() missing 1 required positional argument: 'customer_email' when i try to enter customer name

Collapse
 
brandonwallace profile image
brandon_wallace • Edited

You can add the customer_email when you add the customer to the database.

brandon = Customer(customer_name='Brandon', customer_email='brandon@example.com')
Enter fullscreen mode Exit fullscreen mode
Collapse
 
ekck profile image
Emmanuel Kiprono

Thank you Brandon, it worked out

Collapse
 
brandonwallace profile image
brandon_wallace

Hello Emmanuel, please try to go over your code and look for any typos. I have tested the code a few times. It works.