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

Skip UUID field from seed #59

Open
kshitij-enable opened this issue Jul 8, 2023 · 1 comment
Open

Skip UUID field from seed #59

kshitij-enable opened this issue Jul 8, 2023 · 1 comment

Comments

@kshitij-enable
Copy link

I have an UUID field in the models which is generated by postgres UUID extension. Is there any mechanism to skip adding the value for this field in the json file? Error I am facing -

Traceback (most recent call last):
File "/Users/kshitij/enable/workspace/security/data/seed.py", line 19, in
seeder.seed(entities)
File "/Users/kshitij/enable/workspace/security/.venv/lib/python3.11/site-packages/sqlalchemyseed/seeder.py", line 119, in seed
self._pre_seed()
File "/Users/kshitij/enable/workspace/security/.venv/lib/python3.11/site-packages/sqlalchemyseed/seeder.py", line 131, in _pre_seed
self._seed()
File "/Users/kshitij/enable/workspace/security/.venv/lib/python3.11/site-packages/sqlalchemyseed/seeder.py", line 166, in seed
init_item()
File "/Users/kshitij/enable/workspace/security/.venv/lib/python3.11/site-packages/sqlalchemyseed/seeder.py", line 152, in init_item
instance = class
(**filtered_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: init() missing 1 required positional argument: 'id'

@jedymatt
Copy link
Owner

jedymatt commented Jul 9, 2023

@kshitij-enable thanks for reporting an issue. Can you provide a sample minimal model so that I can reproduce it in my end?

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