Comparing draftable:main...pablospe:main · draftable/compare-api-python-client

Commits on Aug 12, 2025

  1. Fix JSON serialization of DeletionMark objects in Change.to_dict()

    The Change.to_dict() method was returning raw DeletionMark objects instead
    of calling their to_dict() method, causing 'TypeError: Object of type
    DeletionMark is not JSON serializable' when serializing changes.
    
    This fix ensures DeletionMark objects are properly converted to dictionaries
    before serialization, consistent with how other nested objects like Region
    and StylesInfo are handled.
    
    Changes:
    - Fix Change.to_dict() to call self.__deletionMark.to_dict() when present
    - Handle None and missing deletionMark cases properly
    - Add comprehensive test suite covering all serialization scenarios
    
    Fixes: JSON serialization errors when changes contain deletion marks
    Configuration menu

    Browse the repository at this point in the history