Skip to content
This repository was archived by the owner on May 6, 2026. It is now read-only.
This repository was archived by the owner on May 6, 2026. It is now read-only.

DateTimeProperty auto_now* is not set for StructuredProperty and LocalStructuredProperty #216

Closed

Description

@chmoder
  1. OS X
  2. Python 3.7.3
  3. $ pip show google-cloud-ndb
    Name: google-cloud-ndb
    Version: 0.1.0
    Summary: NDB library for Google Cloud Datastore
    Home-page: https://github.com/googleapis/python-ndb
    Author: Google LLC
    Author-email: googleapis-packages@google.com
    License: Apache 2.0
    Location: /Users/tcross/development/virtual-environments/csgapi37/lib/python3.7/site-packages
    Requires: google-cloud-datastore, redis

Steps to reproduce

  1. Create a Model with a DateTimeProperty with auto_now_add=True, use that model in another model as a StructuredProperty or LocalStructuredProperty. Create an instance of the model that has the StructuredProperty and then save it. The StructuredProperties entities DateTimeProperty will have a value of None instead of a date time.

Code example

Foo(ndb.Model):
    dtp = ndb.DateTimeProperty(auto_now_add=True)

Bar(ndb.Model):
    foo = ndb.StructuredProperty(Foo)

bar = Bar()
bar.foo = Foo()
bar.put()

Stack trace

N/A

Activity

  1. changed the title [-]StructuredProperty and LocalStructuredProperty do not set DateTimeProperty auto_now*[/-] [+]DateTimeProperty auto_now* is not set for StructuredProperty and LocalStructuredProperty[/+] on Oct 8, 2019
  2. added
    🚨This issue needs some love.
    and removed
    🚨This issue needs some love.
    triage meI really want to be triaged.
    on Oct 14, 2019
  3. added a commit that references this issue on Oct 17, 2019
    dfd403f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions