diff --git a/datajoint/autopopulate.py b/datajoint/autopopulate.py index 1556df13b..4ac2b767f 100644 --- a/datajoint/autopopulate.py +++ b/datajoint/autopopulate.py @@ -69,6 +69,9 @@ def _jobs_to_do(self, restrictions): """ :return: the relation containing the keys to be computed (derived from self.key_source) """ + if self.restriction: + raise DataJointError('Cannot call populate on a restricted table. ' + 'Instead, pass conditions to populate() as arguments.') todo = self.key_source if not isinstance(todo, RelationalOperand): raise DataJointError('Invalid key_source value') diff --git a/datajoint/user_relations.py b/datajoint/user_relations.py index df9228d55..b24d85ecb 100644 --- a/datajoint/user_relations.py +++ b/datajoint/user_relations.py @@ -12,7 +12,7 @@ # attributes that trigger instantiation of user classes supported_class_attrs = set(( - 'key_source', 'describe', 'populate', 'progress', + 'key_source', 'describe', 'populate', 'progress', 'primary_key', 'proj', 'aggr', 'heading', 'fetch', 'fetch1', 'insert', 'insert1', 'drop', 'drop_quick', 'delete', 'delete_quick'))