Skip to content

Capacity per day as integer only #305

@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

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy