Peel and finely dice the onion and garlic. Cut the sausage into thin slices. Heat oil in a large frying pan. Sauté onion and garlic in it. Add the sausage and fry for approx. 5 minutes while turning.
Add tomatoes, bring to the boil and simmer covered for about 10 minutes.
Pour the beans into a sieve, rinse and drain. Wash the thyme, shake dry, pluck off the leaves. Stir the beans and thyme into the sauce. Simmer for another 5 minutes. Season to taste with salt, pepper and sugar.
Ciabatta is delicious with it.