Alireza Safi

Results 8 comments of Alireza Safi

> A better way would be to create a new model that links to TaskResult with a OneToOneField like this > > ``` > class ExtraTaskInfo(models.Model): > > task_result =...

> @alirezasafi How to populate the fields after the "task_creator" is created ? By caching the user and task (user-id and task-id). after creating the task, use post_save signal to...

> @alirezasafi thks for your prompt response,now the model(extrataskinfo) is created and received the task_result instace in celery signal function. My question is which method is better?(Extra_task_info or new field(task_creator)...

yes its applied to all of them and include bool field even if the value is `False`. here is the sample code: ```python3 from dataclasses import dataclass import betterproto @dataclass...

> ```python > from dataclasses import dataclass > > import betterproto > > @dataclass > class Msg(bettterproto.Message): > bar: bool = betterproto.bool_field(1) > > @dataclass > class Greeting(betterproto.Message): > """Greeting...

> ```python > bool_field > ``` why? i think the output is correct. because the bool field `bar` didn't set and default value disabled.

we could change `to_pydict` to this: ```python3 def to_pydict( self, casing: Casing = Casing.CAMEL, include_default_values: bool = False ) -> Dict[str, Any]: """ Returns a python dict representation of this...

because i don't wanna set default value for all the unset fields.