Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fix for parsing empty D8 #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ TigerShark is an X12 EDI message parser that can be tailored to
a specific partner in the health care payment ecosystem.


Version 0.3.5
-------------

Minor patch for converting zero-length strings to python values in `D8` elements (dates).
Previous behavior raised a `ValueError` trying to convert `''` to a `datetime.date` - now returns `None`.
This now matches the existing functionality for `DR` elements (datetime values)


Version 0.3.4
-------------

Expand Down
2 changes: 1 addition & 1 deletion tigershark/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
TigerShark - An X12 EDI message parser.
"""
__all__ = ['X12VersionTuple']
__version__ = "0.3.4"
__version__ = "0.3.5"
__authors__ = [
"Steven Buss <[email protected]>",
"Steven Lott <[email protected]>",
Expand Down
4 changes: 2 additions & 2 deletions tigershark/facade/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1295,8 +1295,8 @@ def to_dict():

@staticmethod
def x12_to_python(raw):
if raw is None:
return raw
if raw is None or raw == "":
return None

if len(raw) >= 8:
year, month, day = int(raw[0:4]), int(raw[4:6]), int(raw[6:8])
Expand Down