Sign in

Django Tools / FloraConcierge Python Api Client · Files

Logo

GitLab

  • Back to group
  • Project
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • floraconcierge-python-api-client
  • floraconcierge
  • mapping
  • api
  • validation
  • __init__.py
  • sdist upload preparements
    4ef52bf5
    Alexandr Shurigin authored
    2014-12-21 11:29:43 +0200  
    Browse Code ยป
__init__.py 422 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
from floraconcierge.client.types import Object


class Result(Object):
    """
    :type errors: Object
    :type validated: Object
    """

    def __init__(self, *args, **kwargs):
        self.errors = None
        self.validated = None

        super(Result, self).__init__(*args, **kwargs)

    @property
    def is_valid(self):
        return not self.errors

    def __iter__(self):
        return iter(self.errors)