Skip to content

Instantly share code, notes, and snippets.

@jeffreypriebe
Last active August 29, 2015 14:24
Show Gist options
  • Save jeffreypriebe/d2e3d04303370cf99a00 to your computer and use it in GitHub Desktop.
Save jeffreypriebe/d2e3d04303370cf99a00 to your computer and use it in GitHub Desktop.
Keystone BasePage History Inheritance Error
var keystone = require('keystone');
var BasePage = new keystone.List('BasePage', {
map: { name: 'title' },
autokey: { path: 'slug', from: 'title', unique: true },
history: true //<=== This is the single change from the example in the docs.
});
BasePage.add({
title: { type: String, required: true },
slug: { type: String, readonly: true },
});
BasePage.register();
var ChildPage = new keystone.List('ChildPage', { inherits: BasePage });
//ChildPage.add({ child_content: { type: String, readonly: true } }); -- This is not needed to reproduce the bug
ChildPage.register();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment