Details
-
Bug
-
Resolution: Fixed
-
Medium
Description
I can list repositories over the API (including private ones) just fine, but I've been trying to use it to create repositories with no luck.
I've tried following the docs, but it never seems to work. For example this:
curl -uuser:password -X POST -d "name=testapicreate" https://api.bitbucket.org/1.0/repositories/
.. just dumps a stack trace:
{{{
#!python
Piston/0.2.3rc1 (Django 1.2.5) crash report:
Traceback (most recent call last):
File "/opt/python/domains/bitbucket.org/2010-09-28/bitbucket/local/env/lib/python2.7/site-packages/django_piston-0.2.3rc1-py2.7.egg/piston/utils.py", line 91, in wrap
if form.is_valid():
File "/opt/python/domains/bitbucket.org/2010-09-28/bitbucket/local/env/lib/python2.7/site-packages/django/forms/forms.py", line 121, in is_valid
return self.is_bound and not bool(self.errors)
File "/opt/python/domains/bitbucket.org/2010-09-28/bitbucket/local/env/lib/python2.7/site-packages/django/forms/forms.py", line 112, in _get_errors
self.full_clean()
File "/opt/python/domains/bitbucket.org/2010-09-28/bitbucket/local/env/lib/python2.7/site-packages/django/forms/forms.py", line 267, in full_clean
self._clean_fields()
File "/opt/python/domains/bitbucket.org/2010-09-28/bitbucket/local/env/lib/python2.7/site-packages/django/forms/forms.py", line 287, in _clean_fields
value = getattr(self, 'clean_%s' % name)()
File "/opt/python/domains/bitbucket.org/2010-09-28/bitbucket/../bitbucket/apps/bb/forms.py", line 44, in clean_name
if Repository.objects.filter(owner=self.user,
AttributeError: 'RepositoryForm' object has no attribute 'user'
}}}
Assistance would be welcome.