Switch to side-by-side view
--- a/Allura/allura/model/repo.py +++ b/Allura/allura/model/repo.py @@ -123,12 +123,12 @@ return id.replace('.', '/') @classmethod - def upsert(cls, id): + def upsert(cls, id, **kwargs): isnew = False r = cls.query.get(_id=id) if r is not None: return r, isnew try: - r = cls(_id=id) + r = cls(_id=id, **kwargs) session(r).flush(r) isnew = True except pymongo.errors.DuplicateKeyError: # pragma no cover