Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/1.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
SebRut committed May 21, 2022
2 parents bf1fb03 + f00af83 commit fb4f1f7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog

## [v1.2.1](https://github.com/SebRut/pygrocy/tree/v1.2.1) (2022-05-21)

[Full Changelog](https://github.com/SebRut/pygrocy/compare/v1.2.0...v1.2.1)

**Merged pull requests:**

- Fix for optional task due\_date, category and user [\#237](https://github.com/SebRut/pygrocy/pull/237) ([marcelvriend](https://github.com/marcelvriend))

## [v1.2.0](https://github.com/SebRut/pygrocy/tree/v1.2.0) (2022-05-16)

[Full Changelog](https://github.com/SebRut/pygrocy/compare/v1.1.0...v1.2.0)
Expand Down
2 changes: 2 additions & 0 deletions pygrocy/data_models/task.py
Expand Up @@ -40,9 +40,11 @@ def __init__(self, response: TaskResponse):
self._done = response.done
self._done_timestamp = response.done_timestamp
self._category_id = response.category_id
self._category = None
if response.category:
self._category = TaskCategory(response.category)
self._assigned_to_user_id = response.assigned_to_user_id
self._assigned_to_user = None
if response.assigned_to_user:
self._assigned_to_user = User(response.assigned_to_user)
self._userfields = response.userfields
Expand Down
3 changes: 2 additions & 1 deletion pygrocy/grocy_api_client.py
Expand Up @@ -202,7 +202,7 @@ class TaskResponse(BaseModel):
id: int
name: str
description: Optional[str] = None
due_date: date = None
due_date: Optional[date] = None
done: int
done_timestamp: Optional[datetime] = None
category_id: Optional[int] = None
Expand All @@ -211,6 +211,7 @@ class TaskResponse(BaseModel):
assigned_to_user: Optional[UserDto] = None
userfields: Optional[Dict] = None

due_date_validator = _field_not_empty_validator("due_date")
category_id_validator = _field_not_empty_validator("category_id")
assigned_to_user_id_validator = _field_not_empty_validator("assigned_to_user_id")

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="pygrocy",
version="1.2.0",
version="1.2.1",
author="Sebastian Rutofski",
author_email="kontakt@sebastian-rutofski.de",
description="",
Expand Down

0 comments on commit fb4f1f7

Please sign in to comment.