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

Update Mode Statement Count Check Does Not Specify "Objects" #1020

Open
mdykemanSF opened this issue Mar 4, 2024 · 0 comments
Open

Update Mode Statement Count Check Does Not Specify "Objects" #1020

mdykemanSF opened this issue Mar 4, 2024 · 0 comments

Comments

@mdykemanSF
Copy link

mdykemanSF commented Mar 4, 2024

When updating sObjects in Salesforce, Snowfakery performs a count check of statements in parse_recipe_yaml.py:753

error_message = "Update recipes should have a single object declaration."
    if len(statements) != 1:
        raise exc.DataGenSyntaxError(error_message)

However, no check is performed here to limit this to object statements.

The YAML

- snowfakery_version: 3
- var: snowfakery_locale
  value: en_US

- object: Contact
  fields:
    MobilePhone: ${{fake.BasicPhoneNumber}}
    HomePhone: ${{fake.BasicPhoneNumber}}

results in the error Error: Update recipes should have a single object declaration.
because the list of statements also contains a variable, despite the recipe only containing a single object

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

1 participant