[PATCH 1/3] Start moving code from the controller to the logic

Bohuslav Kabrda bkabrda at redhat.com
Wed Jan 23 12:52:58 UTC 2013


----- Original Message -----
> There are several advantages in doing that :
> - we can reuse it in the API
> - less coupling to the framework
> - easier unit-testing for the logic
> ---
> 
> Is it better this way?
> 
<snip>
> +    def add_build(cls, user, pkgs, copr):
...
> +        db.session.commit()
</snip>

You probably forget to remove the committing from *Logic, right?

<snip>
>      @classmethod
> +    def add_coprs(cls, user, name, repos, selected_chroots):
</snip>

I'd name this in singular form (add_copr).
Otherwise it looks ok. If you agree, I'll commit and fix the tiny issues myself (or if you want, you can redo the patch again).

Thanks.

-- 
Regards,
Bohuslav "Slavek" Kabrda.


More information about the copr-devel mailing list