Skip to content

call of "self.context().get_recipe()", should be "self.context.get_recipe()"? #407

Open
@dean-krueger

Description

@dean-krueger

Home >> CYCLUS Archetype Developer Guide >> Dynamic Resource Exchange >> Request for Bids Phase >> Python

The sample code reads:

def get_material_requests(self):
request_qty = 10.0 # kg
# Material Target A
recipe_a = self.context().get_recipe("recipeA")
target_a = ts.Material.create_untracked(request_qty, recipe_a)

should it instead be:

def get_material_requests(self):
request_qty = 10.0 # kg
# Material Target A
recipe_a = self.context.get_recipe("recipeA")
target_a = ts.Material.create_untracked(request_qty, recipe_a)

ie. self.context.get_recipe("recipeA") instead of self.context().get_recipe("recipeA")?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions