Snowfakery icon indicating copy to clipboard operation
Snowfakery copied to clipboard

Formula prints Python Object reference under some conditions

Open acrosman opened this issue 3 years ago • 0 comments

The following recipe will generate a Python object reference in the output instead of either a error or blank output when the value is invalid or the expected value.

Recipe

- object: Contact
  fields:
    FirstName:
      fake: FirstName
- object: Opportunity
  fields:
    ContactId:
      random_reference: Contact
    Name: Opportunity1
  friends:
    - object: CampaignMember
      fields:
        ContactId: ${{Opportunity.ContactId}}

Generated Output

[{"_table": "Contact", "id": 1, "FirstName": "Kylie"},
{"_table": "Opportunity", "id": 1, "ContactId": 1, "Name": "Opportunity1"},
{"_table": "CampaignMember", "id": 1, "ContactId": "<snowfakery.object_rows.ObjectReference object at 0x000001E03EDCBA30>"}]

acrosman avatar Feb 02 '22 23:02 acrosman