Skip to content

Commit

Permalink
Merge pull request #50 from pepkit/dev
Browse files Browse the repository at this point in the history
V 0.2.2
  • Loading branch information
khoroshevskyi authored Nov 9, 2022
2 parents 771f50e + 3eca0ce commit 08b5356
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format.

## [0.2.2] -- 2022-11-09

- Fixed error in pepannotation (privacy error)

## [0.2.1] -- 2022-11-09

- Fixed error with namespace user if user is unknown
Expand Down
2 changes: 1 addition & 1 deletion pepdbagent/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.1"
__version__ = "0.2.2"
9 changes: 8 additions & 1 deletion pepdbagent/pepannot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pydantic import BaseModel, Field
from pydantic import BaseModel, Field, validator
from typing import Optional


Expand All @@ -11,3 +11,10 @@ class Annotation(BaseModel):

class Config:
allow_population_by_field_name = True
validate_assignment = True

@validator("is_private", pre=True, always=True)
def set_name(cls, is_private):
if is_private is None:
return False
return is_private

0 comments on commit 08b5356

Please sign in to comment.