Skip to content

Capacity per day as integer only #305

Closed
@RK159

Description

@RK159

In v5_1/work/models.py

`
class Activity(Model):
"""Activity.

:param capacity_per_day:
:type capacity_per_day: int
:param name:
:type name: str
"""

_attribute_map = {
    'capacity_per_day': {'key': 'capacityPerDay', 'type': 'int'},
    'name': {'key': 'name', 'type': 'str'}
}

def __init__(self, capacity_per_day=None, name=None):
    super(Activity, self).__init__()
    self.capacity_per_day = capacity_per_day
    self.name = name

`

the type of the parameter capacity_per_day is 'int', but the user could fill that field with a float.

For instance with a 10 days iteration, if the user fills "4.9" in capacity per day, and that we want to use the api to calculate the total capacity for the iteration, the results from the api will be 40 instead of 49

Is there a way to change that?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions