Skip to content

allow all models to be created with no data #112

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

Open
dwhieb opened this issue Feb 27, 2020 · 0 comments
Open

allow all models to be created with no data #112

dwhieb opened this issue Feb 27, 2020 · 0 comments
Labels
core Core models and utilities feature Changes that affect the API

Comments

@dwhieb
Copy link
Member

dwhieb commented Feb 27, 2020

Often a model will need to be instantiated with no data. Though in many cases this violates the DLx spec (for example, the Language model requires a name field), it's necessary to allow this for data entry purposes.

Tests

  it(`new Language()`, function() {
    expect(() => new Language()).not.toThrow();
    expect(() => new Language({})).not.toThrow();
  });
@dwhieb dwhieb added feature Changes that affect the API core Core models and utilities labels Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core models and utilities feature Changes that affect the API
Projects
None yet
Development

No branches or pull requests

1 participant